fix alway defaulting to freq even if divisor was applied. Will still have issue when addressing both standard values..

This commit is contained in:
iceman1001 2022-05-30 22:35:33 +02:00
parent 65b9a9fb76
commit a5b5b2f08a

View file

@ -137,8 +137,16 @@ static int CmdLFTune(const char *Cmd) {
PrintAndLogEx(ERR, "freq must be between 47 and 600"); PrintAndLogEx(ERR, "freq must be between 47 and 600");
return PM3_EINVARG; return PM3_EINVARG;
} }
if (divisor != LF_DIVISOR_125 && freq != 125) {
PrintAndLogEx(ERR, "Select either `divisor` or `frequency`");
return PM3_EINVARG;
}
if (freq != 125)
divisor = LF_FREQ2DIV(freq); divisor = LF_FREQ2DIV(freq);
if ((is_bar + is_mix + is_value) > 1) { if ((is_bar + is_mix + is_value) > 1) {
PrintAndLogEx(ERR, "Select only one output style"); PrintAndLogEx(ERR, "Select only one output style");
return PM3_EINVARG; return PM3_EINVARG;