simpler debug

This commit is contained in:
iceman1001 2018-02-21 16:46:38 +01:00
commit db6b1bab7d
5 changed files with 51 additions and 62 deletions

View file

@ -73,14 +73,14 @@ int detectViking(uint8_t *dest, size_t *size) {
//see ASKDemod for what args are accepted
int CmdVikingDemod(const char *Cmd) {
if (!ASKDemod(Cmd, false, false, 1)) {
if (g_debugMode) PrintAndLogEx(DEBUG, "DEBUG: Error - Viking ASKDemod failed");
PrintAndLogEx(DEBUG, "DEBUG: Error - Viking ASKDemod failed");
return 0;
}
size_t size = DemodBufferLen;
int ans = detectViking(DemodBuffer, &size);
if (ans < 0) {
if (g_debugMode) PrintAndLogEx(DEBUG, "DEBUG: Error - Viking Demod %d %s", ans, (ans == -5)?"[chksum error]":"");
PrintAndLogEx(DEBUG, "DEBUG: Error - Viking Demod %d %s", ans, (ans == -5)?"[chksum error]":"");
return 0;
}
//got a good demod