mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
chg: 'hw tune' - only show plotwindow if LF antenna is connected (ie we get lf values)
This commit is contained in:
parent
ff598db839
commit
5b596f8e82
1 changed files with 11 additions and 5 deletions
|
@ -1451,7 +1451,7 @@ int CmdTuneSamples(const char *Cmd) {
|
||||||
|
|
||||||
// HF evaluation
|
// HF evaluation
|
||||||
if ( v_hf > NON_VOLTAGE )
|
if ( v_hf > NON_VOLTAGE )
|
||||||
PrintAndLog("[+] HF antenna: %5.2f V - 13.56 MHz %s", (v_hf * ANTENNA_ERROR)/1000.0, judgement);
|
PrintAndLog("[+] HF antenna: %5.2f V - 13.56 MHz", (v_hf * ANTENNA_ERROR)/1000.0);
|
||||||
|
|
||||||
memset(judgement, 0, sizeof(judgement));
|
memset(judgement, 0, sizeof(judgement));
|
||||||
|
|
||||||
|
@ -1468,13 +1468,19 @@ int CmdTuneSamples(const char *Cmd) {
|
||||||
|
|
||||||
// graph LF measurements
|
// graph LF measurements
|
||||||
// even here, these values has 3% error.
|
// even here, these values has 3% error.
|
||||||
|
uint16_t test = 0;
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
GraphBuffer[i] = resp.d.asBytes[i] - 128;
|
GraphBuffer[i] = resp.d.asBytes[i] - 128;
|
||||||
|
test += resp.d.asBytes[i];
|
||||||
}
|
}
|
||||||
|
if ( test > 0 ) {
|
||||||
PrintAndLog("\n[+] Displaying LF tuning graph. Divisor 89 is 134khz, 95 is 125khz.\n\n");
|
PrintAndLog("\n[+] Displaying LF tuning graph. Divisor 89 is 134khz, 95 is 125khz.\n\n");
|
||||||
GraphTraceLen = 256;
|
GraphTraceLen = 256;
|
||||||
ShowGraphWindow();
|
ShowGraphWindow();
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
|
} else {
|
||||||
|
PrintAndLog("\n[-] Not showing LF tuning graph since all values is zero.\n\n");
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue