fix: 'lf pyramid demod' - inverted

chg: checksum colors
This commit is contained in:
iceman1001 2019-03-23 19:06:52 +01:00
parent ca9061bd32
commit 55b8b8df82
2 changed files with 8 additions and 6 deletions

View file

@ -55,7 +55,7 @@ int detectPyramid(uint8_t *dest, size_t *size, int *waveStartIdx) {
if (getSignalProperties()->isnoise) return -2;
// FSK demodulator RF/50 FSK 10,8
*size = fskdemod(dest, *size, 50, 0, 10, 8, waveStartIdx); // pyramid fsk2
*size = fskdemod(dest, *size, 50, 1, 10, 8, waveStartIdx); // pyramid fsk2
//did we get a good demod?
if (*size < 128) return -3;
@ -235,11 +235,13 @@ int CmdPyramidDemod(const char *Cmd) {
PrintAndLogEx(SUCCESS, "Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
}
}
if (checksum == checkCS)
PrintAndLogEx(SUCCESS, "Checksum %02x passed", checksum);
else
PrintAndLogEx(FAILED, "Checksum %02x failed - should have been %02x", checksum, checkCS);
PrintAndLogEx(SUCCESS, "Checksum : 0x%02X - %02X - %s"
, checksum
, checkCS
, (checksum == checkCS) ? _GREEN_("Passed") : _RED_("Failed")
);
PrintAndLogEx(DEBUG, "DEBUG: Pyramid: idx: %d, Len: %d, Printing Demod Buffer:", idx, 128);
if (g_debugMode)
printDemodBuff();

View file

@ -254,7 +254,7 @@ int CmdTIDemod(const char *Cmd) {
//crc = crc16_ccitt(message, sizeof(message);
char *crcStr = (crc == (shift2 & 0xFFFF)) ? "Passed" : "Failed";
char *crcStr = (crc == (shift2 & 0xFFFF)) ? _GREEN_("Passed") : _RED_("Failed");
PrintAndLogEx(INFO, "Tag data = %08X%08X [Crc %04X %s]", shift1, shift0, crc, crcStr);