diff --git a/client/cmddata.c b/client/cmddata.c index bcaeaf3bc..8b263e44d 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -1576,7 +1576,7 @@ int CmdLoad(const char *Cmd) { // set signal properties low/high/mean/amplitude and isnoice detection uint8_t bits[GraphTraceLen]; size_t size = getFromGraphBuf(bits); - isNoise(bits, sizeof(bits)); + isNoise(bits, size); return 0; } diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index 420caeb62..b17864dcf 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -242,7 +242,7 @@ int CmdAWIDRead_device(const char *Cmd) { int CmdAWIDDemod(const char *Cmd) { uint8_t bits[MAX_GRAPH_TRACE_LEN]={0}; size_t size = getFromGraphBuf(bits); - if (size==0) { + if (size == 0) { PrintAndLogEx(DEBUG, "DEBUG: Error - AWID not enough samples"); return 0; } diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index 1664a3c2b..1e408bbf6 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -799,7 +799,6 @@ int EM4x50Read(const char *Cmd, bool verbose) { uint8_t bits[MAX_GRAPH_TRACE_LEN] = {0}; size_t size = getFromGraphBuf(bits); - isNoise(bits, size); signal_t *sp = getSignalProperties(); diff --git a/client/cmdlfhid.c b/client/cmdlfhid.c index 02fd9c791..ced656789 100644 --- a/client/cmdlfhid.c +++ b/client/cmdlfhid.c @@ -130,7 +130,7 @@ int CmdHIDDemod(const char *Cmd) { uint8_t bits[MAX_GRAPH_TRACE_LEN] = {0}; size_t size = getFromGraphBuf(bits); - if (size==0) { + if (size == 0) { PrintAndLogEx(DEBUG, "DEBUG: Error - HID not enough samples"); return 0; } diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index 7fbf143d3..9102efc5c 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -538,7 +538,7 @@ bool tryDetectModulation(){ } } else { clk = GetAskClock("", false); - if (clk>0) { + if (clk > 0) { tests[hits].ST = true; // "0 0 1 " == clock auto, invert false, maxError 1. // false = no verbose @@ -583,7 +583,7 @@ bool tryDetectModulation(){ } } clk = GetNrzClock("", false); - if (clk>8) { //clock of rf/8 is likely a false positive, so don't use it. + if (clk > 8) { //clock of rf/8 is likely a false positive, so don't use it. if ( NRZrawDemod("0 0 1", false) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) { tests[hits].modulation = DEMOD_NRZ; tests[hits].bitrate = bitRate; @@ -604,7 +604,7 @@ bool tryDetectModulation(){ } clk = GetPskClock("", false); - if (clk>0) { + if (clk > 0) { // allow undo save_restoreGB(GRAPH_SAVE); // skip first 160 samples to allow antenna to settle in (psk gets inverted occasionally otherwise)