mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-06 16:27:22 +08:00
chg: cleaning up
This commit is contained in:
parent
abdd51b6b3
commit
5e1a3b7168
1 changed files with 7 additions and 19 deletions
|
@ -770,17 +770,14 @@ int CmdAutoCorr(const char *Cmd) {
|
||||||
bool errors = false;
|
bool errors = false;
|
||||||
|
|
||||||
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
|
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
|
||||||
switch (param_getchar(Cmd, cmdp)) {
|
switch (tolower(param_getchar(Cmd, cmdp))) {
|
||||||
case 'h':
|
case 'h':
|
||||||
case 'H':
|
|
||||||
return usage_data_autocorr();
|
return usage_data_autocorr();
|
||||||
case 'g':
|
case 'g':
|
||||||
case 'G':
|
|
||||||
updateGrph = true;
|
updateGrph = true;
|
||||||
cmdp++;
|
cmdp++;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
case 'W':
|
|
||||||
window = param_get32ex(Cmd, cmdp+1, 4000, 10);
|
window = param_get32ex(Cmd, cmdp+1, 4000, 10);
|
||||||
if (window >= GraphTraceLen) {
|
if (window >= GraphTraceLen) {
|
||||||
PrintAndLogEx(WARNING, "window must be smaller than trace (%d samples)", GraphTraceLen);
|
PrintAndLogEx(WARNING, "window must be smaller than trace (%d samples)", GraphTraceLen);
|
||||||
|
@ -935,21 +932,17 @@ int CmdDetectClockRate(const char *Cmd)
|
||||||
return usage_data_detectclock();
|
return usage_data_detectclock();
|
||||||
|
|
||||||
int clock = 0;
|
int clock = 0;
|
||||||
switch ( cmdp ) {
|
switch ( tolower(cmdp) ) {
|
||||||
case 'a' :
|
case 'a' :
|
||||||
case 'A' :
|
|
||||||
clock = GetAskClock(Cmd+1, true);
|
clock = GetAskClock(Cmd+1, true);
|
||||||
break;
|
break;
|
||||||
case 'f' :
|
case 'f' :
|
||||||
case 'F' :
|
|
||||||
clock = GetFskClock("", true);
|
clock = GetFskClock("", true);
|
||||||
break;
|
break;
|
||||||
case 'n' :
|
case 'n' :
|
||||||
case 'N' :
|
|
||||||
clock = GetNrzClock("", true);
|
clock = GetNrzClock("", true);
|
||||||
break;
|
break;
|
||||||
case 'p' :
|
case 'p' :
|
||||||
case 'P' :
|
|
||||||
clock = GetPskClock("", true);
|
clock = GetPskClock("", true);
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
|
@ -1546,14 +1539,13 @@ int CmdTuneSamples(const char *Cmd) {
|
||||||
test += resp.d.asBytes[i];
|
test += resp.d.asBytes[i];
|
||||||
}
|
}
|
||||||
if ( test > 0 ) {
|
if ( test > 0 ) {
|
||||||
PrintAndLogEx(NORMAL, "\n");
|
PrintAndLogEx(SUCCESS, "\nDisplaying LF tuning graph. Divisor 89 is 134khz, 95 is 125khz.\n\n");
|
||||||
PrintAndLogEx(SUCCESS, " Displaying LF tuning graph. Divisor 89 is 134khz, 95 is 125khz.\n\n");
|
|
||||||
GraphTraceLen = 256;
|
GraphTraceLen = 256;
|
||||||
ShowGraphWindow();
|
ShowGraphWindow();
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(NORMAL, "\n");
|
|
||||||
PrintAndLogEx(FAILED, "Not showing LF tuning graph since all values is zero.\n\n");
|
PrintAndLogEx(FAILED, "\nNot showing LF tuning graph since all values is zero.\n\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1981,22 +1973,18 @@ int CmdFSKToNRZ(const char *Cmd) {
|
||||||
int fc_low = 10, fc_high = 8;
|
int fc_low = 10, fc_high = 8;
|
||||||
while(param_getchar(Cmd, cmdp) != 0x00)
|
while(param_getchar(Cmd, cmdp) != 0x00)
|
||||||
{
|
{
|
||||||
switch(param_getchar(Cmd, cmdp))
|
switch (tolower(param_getchar(Cmd, cmdp)))
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
case 'H':
|
|
||||||
return usage_data_fsktonrz();
|
return usage_data_fsktonrz();
|
||||||
case 'C':
|
|
||||||
case 'c':
|
case 'c':
|
||||||
clk = param_get32ex(Cmd, cmdp+1, 0, 10);
|
clk = param_get32ex(Cmd, cmdp+1, 0, 10);
|
||||||
cmdp += 2;
|
cmdp += 2;
|
||||||
break;
|
break;
|
||||||
case 'F':
|
|
||||||
case 'f':
|
case 'f':
|
||||||
fc_high = param_get32ex(Cmd, cmdp+1, 0, 10);
|
fc_high = param_get32ex(Cmd, cmdp+1, 0, 10);
|
||||||
cmdp += 2;
|
cmdp += 2;
|
||||||
break;
|
break;
|
||||||
case 'L':
|
|
||||||
case 'l':
|
case 'l':
|
||||||
fc_low = param_get32ex(Cmd, cmdp+1, 0, 10);
|
fc_low = param_get32ex(Cmd, cmdp+1, 0, 10);
|
||||||
cmdp += 2;
|
cmdp += 2;
|
||||||
|
|
Loading…
Reference in a new issue