X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/56d0fb8e4d4f4a963928de36a12c519a09673bd1..cf08edc97cfdb89ae4c87260ceaed150364bfbc8:/client/cmddata.c diff --git a/client/cmddata.c b/client/cmddata.c index 378fb78f..acb1359e 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -969,17 +969,17 @@ int CmdUndec(const char *Cmd) //shift graph zero up or down based on input + or - int CmdGraphShiftZero(const char *Cmd) { - int shift=0; + int shift = 0, shiftedVal = 0; //set options from parameters entered with the command sscanf(Cmd, "%i", &shift); - int shiftedVal=0; + for(int i = 0; i127) - shiftedVal=127; - else if (shiftedVal<-127) - shiftedVal=-127; - GraphBuffer[i]= shiftedVal; + if (shiftedVal > 127) + shiftedVal = 127; + else if (shiftedVal < -127) + shiftedVal = -127; + GraphBuffer[i] = shiftedVal; } CmdNorm(""); return 0; @@ -2146,10 +2146,14 @@ int CmdTuneSamples(const char *Cmd) peakf = resp.arg[2] & 0xffff; peakv = resp.arg[2] >> 16; PrintAndLog(""); - PrintAndLog("# LF antenna: %5.2f V @ 125.00 kHz", vLf125/1000.0); - PrintAndLog("# LF antenna: %5.2f V @ 134.00 kHz", vLf134/1000.0); - PrintAndLog("# LF optimal: %5.2f V @%9.2f kHz", peakv/1000.0, 12000.0/(peakf+1)); - PrintAndLog("# HF antenna: %5.2f V @ 13.56 MHz", vHf/1000.0); + if ( vLf125 > 0 ) + PrintAndLog("# LF antenna: %5.2f V @ 125.00 kHz", vLf125/1000.0); + if ( vLf134 > 0 ) + PrintAndLog("# LF antenna: %5.2f V @ 134.00 kHz", vLf134/1000.0); + if ( peakv > 0 && peakf > 0 ) + PrintAndLog("# LF optimal: %5.2f V @%9.2f kHz", peakv/1000.0, 12000.0/(peakf+1)); + if ( vHf > 0 ) + PrintAndLog("# HF antenna: %5.2f V @ 13.56 MHz", vHf/1000.0); #define LF_UNUSABLE_V 2948 // was 2000. Changed due to bugfix in voltage measurements. LF results are now 47% higher. #define LF_MARGINAL_V 14739 // was 10000. Changed due to bugfix bug in voltage measurements. LF results are now 47% higher.