mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
cleanup
This commit is contained in:
parent
0004b1075e
commit
d1ae9dc76e
1 changed files with 8 additions and 10 deletions
|
@ -103,7 +103,6 @@ void computeSignalProperties(uint8_t *samples, uint32_t size) {
|
||||||
// we can detect noise
|
// we can detect noise
|
||||||
signalprop.isnoise = signalprop.amplitude < NOISE_AMPLITUDE_THRESHOLD;
|
signalprop.isnoise = signalprop.amplitude < NOISE_AMPLITUDE_THRESHOLD;
|
||||||
|
|
||||||
if (g_debugMode)
|
|
||||||
printSignal();
|
printSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +145,6 @@ void getHiLo(int *high, int *low, uint8_t fuzzHi, uint8_t fuzzLo) {
|
||||||
*low = signalprop.low;
|
*low = signalprop.low;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_debugMode)
|
|
||||||
prnt("getHiLo fuzzed: High %d | Low %d", *high, *low);
|
prnt("getHiLo fuzzed: High %d | Low %d", *high, *low);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,12 +269,13 @@ bool preambleSearchEx(uint8_t *bits, uint8_t *preamble, size_t pLen, size_t *siz
|
||||||
//first index found
|
//first index found
|
||||||
foundCnt++;
|
foundCnt++;
|
||||||
if (foundCnt == 1) {
|
if (foundCnt == 1) {
|
||||||
if (g_debugMode) prnt("DEBUG: (preambleSearchEx) preamble found at %i", idx);
|
prnt("DEBUG: (preambleSearchEx) preamble found at %i", idx);
|
||||||
*startIdx = idx;
|
*startIdx = idx;
|
||||||
if (findone) return true;
|
if (findone)
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (foundCnt == 2) {
|
if (foundCnt == 2) {
|
||||||
if (g_debugMode) prnt("DEBUG: (preambleSearchEx) preamble 2 found at %i", idx);
|
prnt("DEBUG: (preambleSearchEx) preamble 2 found at %i", idx);
|
||||||
*size = idx - *startIdx;
|
*size = idx - *startIdx;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1581,13 +1580,12 @@ int askdemod_ext(uint8_t *bits, size_t *size, int *clk, int *invert, int maxErr,
|
||||||
errCnt = manrawdecode(bits, size, 0, &alignPos);
|
errCnt = manrawdecode(bits, size, 0, &alignPos);
|
||||||
*startIdx += ((*clk / 2) * alignPos);
|
*startIdx += ((*clk / 2) * alignPos);
|
||||||
|
|
||||||
if (g_debugMode)
|
|
||||||
prnt("DEBUG: (askdemod_ext) CLEAN: startIdx %i, alignPos %u , bestError %u", *startIdx, alignPos, errCnt);
|
prnt("DEBUG: (askdemod_ext) CLEAN: startIdx %i, alignPos %u , bestError %u", *startIdx, alignPos, errCnt);
|
||||||
}
|
}
|
||||||
return errCnt;
|
return errCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_debugMode) prnt("DEBUG: (askdemod_ext) Weak wave detected: startIdx %i", *startIdx);
|
prnt("DEBUG: (askdemod_ext) Weak wave detected: startIdx %i", *startIdx);
|
||||||
|
|
||||||
int lastBit; //set first clock check - can go negative
|
int lastBit; //set first clock check - can go negative
|
||||||
size_t i, bitnum = 0; //output counter
|
size_t i, bitnum = 0; //output counter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue