mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
simpler debug
This commit is contained in:
parent
0248352ea6
commit
db6b1bab7d
5 changed files with 51 additions and 62 deletions
|
@ -104,23 +104,22 @@ int CmdVisa2kDemod(const char *Cmd) {
|
|||
//ASK / Manchester
|
||||
bool st = true;
|
||||
if (!ASKDemod_ext("64 0 0", false, false, 1, &st)) {
|
||||
if (g_debugMode) PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: ASK/Manchester Demod failed");
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: ASK/Manchester Demod failed");
|
||||
save_restoreGB(0);
|
||||
return 0;
|
||||
}
|
||||
size_t size = DemodBufferLen;
|
||||
int ans = detectVisa2k(DemodBuffer, &size);
|
||||
if (ans < 0){
|
||||
if (g_debugMode){
|
||||
if (ans == -1)
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: too few bits found");
|
||||
else if (ans == -2)
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: preamble not found");
|
||||
else if (ans == -3)
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: Size not correct: %d", size);
|
||||
else
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: ans: %d", ans);
|
||||
}
|
||||
if (ans == -1)
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: too few bits found");
|
||||
else if (ans == -2)
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: preamble not found");
|
||||
else if (ans == -3)
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: Size not correct: %d", size);
|
||||
else
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Visa2k: ans: %d", ans);
|
||||
|
||||
save_restoreGB(0);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue