diff --git a/client/cmdlfti.c b/client/cmdlfti.c index b7bdea54b..d74b91f2e 100644 --- a/client/cmdlfti.c +++ b/client/cmdlfti.c @@ -166,9 +166,9 @@ int CmdTIDemod(const char *Cmd) GraphBuffer[maxPos] = 800; GraphBuffer[maxPos+1] = -800; - PrintAndLog("actual data bits start at sample %d", maxPos); + PrintAndLogEx(NORMAL, "actual data bits start at sample %d", maxPos); - PrintAndLog("length %d/%d", highLen, lowLen); + PrintAndLogEx(NORMAL, "length %d/%d", highLen, lowLen); uint8_t bits[1+64+16+8+16]; bits[sizeof(bits)-1] = '\0'; @@ -209,19 +209,19 @@ int CmdTIDemod(const char *Cmd) RepaintGraphWindow(); - PrintAndLog("Info: raw tag bits = %s", bits); + PrintAndLogEx(INFO, "INFO: raw tag bits = %s", bits); TagType = (shift3>>8)&0xff; if ( TagType != ((shift0>>16)&0xff) ) { - PrintAndLog("Error: start and stop bits do not match!"); + PrintAndLogEx(WARNING, "Error: start and stop bits do not match!"); return 0; } else if (TagType == 0x7e) { - PrintAndLog("Info: Readonly TI tag detected."); + PrintAndLogEx(INFO, "INFO: Readonly TI tag detected."); return 0; } else if (TagType == 0xfe) { - PrintAndLog("Info: Rewriteable TI tag detected."); + PrintAndLogEx(INFO, "INFO: Rewriteable TI tag detected."); // put 64 bit data into shift1 and shift0 shift0 = (shift0>>24) | (shift1 << 8); @@ -235,7 +235,7 @@ int CmdTIDemod(const char *Cmd) // only 15 bits compare, last bit of ident is not valid if ( (shift3^shift0)&0x7fff ) { - PrintAndLog("Error: Ident mismatch!"); + PrintAndLogEx(WARNING, "Error: Ident mismatch!"); } // WARNING the order of the bytes in which we calc crc below needs checking // i'm 99% sure the crc algorithm is correct, but it may need to eat the @@ -255,14 +255,14 @@ int CmdTIDemod(const char *Cmd) char *crcStr = (crc == (shift2&0xffff) ) ? "Passed" : "Failed"; - PrintAndLog("Tag data = %08X%08X [Crc %04X %s]", shift1, shift0, crc, crcStr ); + PrintAndLogEx(NORMAL, "Tag data = %08X%08X [Crc %04X %s]", shift1, shift0, crc, crcStr ); if (crc != (shift2&0xffff)) - PrintAndLog("Error: CRC mismatch, calculated %04X, got %04X", crc, shift2&0xffff); + PrintAndLogEx(WARNING, "Error: CRC mismatch, calculated %04X, got %04X", crc, shift2&0xffff); } else { - PrintAndLog("Unknown tag type."); + PrintAndLogEx(WARNING, "Unknown tag type."); } return 0; } @@ -285,7 +285,7 @@ int CmdTIWrite(const char *Cmd) if (res == 2) c.arg[2]=0; if (res < 2) { - PrintAndLog("Please specify the data as two hex strings, optionally the CRC as a third"); + PrintAndLogEx(NORMAL, "Please specify the data as two hex strings, optionally the CRC as a third"); return 1; } clearCommandBuffer();