mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
lf: change macros to allow float freq, change 134 -> 134.2
This commit is contained in:
parent
cb06bea448
commit
eb7268cd98
5 changed files with 15 additions and 14 deletions
|
@ -232,7 +232,7 @@ int CmdLFTune(const char *Cmd) {
|
|||
break;
|
||||
case 'f': {
|
||||
int freq = param_get32ex(Cmd, cmdp + 1, 125, 10);
|
||||
divisor = LF_DIVISOR(freq);
|
||||
divisor = LF_FREQ2DIV(freq);
|
||||
if (divisor < 19) {
|
||||
PrintAndLogEx(ERR, "freq must be between 47 and 600");
|
||||
return PM3_EINVARG;
|
||||
|
@ -254,7 +254,7 @@ int CmdLFTune(const char *Cmd) {
|
|||
//Validations
|
||||
if (errors) return usage_lf_tune();
|
||||
|
||||
PrintAndLogEx(SUCCESS, "Measuring LF antenna at %.2f kHz, click button or press Enter to exit", 12000.0 / (divisor + 1));
|
||||
PrintAndLogEx(SUCCESS, "Measuring LF antenna at %.2f kHz, click button or press Enter to exit", LF_DIV2FREQ(divisor));
|
||||
|
||||
uint8_t params[] = {1, 0};
|
||||
params[1] = divisor;
|
||||
|
@ -498,7 +498,7 @@ int CmdLFConfig(const char *Cmd) {
|
|||
break;
|
||||
case 'f': {
|
||||
int freq = param_get32ex(Cmd, cmdp + 1, 125, 10);
|
||||
divisor = LF_DIVISOR(freq);
|
||||
divisor = LF_FREQ2DIV(freq);
|
||||
if (divisor < 19) {
|
||||
PrintAndLogEx(ERR, "freq must be between 47 and 600");
|
||||
return PM3_EINVARG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue