mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-17 18:50:32 +08:00
fix: 'lf pyramid demod' - inverted
chg: checksum colors
This commit is contained in:
parent
ca9061bd32
commit
55b8b8df82
2 changed files with 8 additions and 6 deletions
|
@ -55,7 +55,7 @@ int detectPyramid(uint8_t *dest, size_t *size, int *waveStartIdx) {
|
||||||
if (getSignalProperties()->isnoise) return -2;
|
if (getSignalProperties()->isnoise) return -2;
|
||||||
|
|
||||||
// FSK demodulator RF/50 FSK 10,8
|
// 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?
|
//did we get a good demod?
|
||||||
if (*size < 128) return -3;
|
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);
|
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);
|
PrintAndLogEx(DEBUG, "DEBUG: Pyramid: idx: %d, Len: %d, Printing Demod Buffer:", idx, 128);
|
||||||
if (g_debugMode)
|
if (g_debugMode)
|
||||||
printDemodBuff();
|
printDemodBuff();
|
||||||
|
|
|
@ -254,7 +254,7 @@ int CmdTIDemod(const char *Cmd) {
|
||||||
|
|
||||||
//crc = crc16_ccitt(message, sizeof(message);
|
//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);
|
PrintAndLogEx(INFO, "Tag data = %08X%08X [Crc %04X %s]", shift1, shift0, crc, crcStr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue