simpler branching

This commit is contained in:
iceman1001 2019-04-08 08:11:18 +02:00
parent a89ae9cb35
commit 8d2c02878b

View file

@ -224,16 +224,15 @@ int CmdPyramidDemod(const char *Cmd) {
fc = bytebits_to_byte(bits + 53, 10);
cardnum = bytebits_to_byte(bits + 63, 32);
PrintAndLogEx(SUCCESS, "Pyramid ID Found - BitLength: %d, FC: %d, Card: %d - Raw: %08x%08x%08x%08x", fmtLen, fc, cardnum, rawHi3, rawHi2, rawHi, rawLo);
} else if (fmtLen > 32) {
cardnum = bytebits_to_byte(bits + 81, 16);
//code1 = bytebits_to_byte(bits+(size-fmtLen),fmtLen-32);
//code2 = bytebits_to_byte(bits+(size-32),32);
PrintAndLogEx(SUCCESS, "Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
} else {
cardnum = bytebits_to_byte(bits + 81, 16);
if (fmtLen > 32) {
//code1 = bytebits_to_byte(bits+(size-fmtLen),fmtLen-32);
//code2 = bytebits_to_byte(bits+(size-32),32);
PrintAndLogEx(SUCCESS, "Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
} else {
//code1 = bytebits_to_byte(bits+(size-fmtLen),fmtLen);
PrintAndLogEx(SUCCESS, "Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
}
//code1 = bytebits_to_byte(bits+(size-fmtLen),fmtLen);
PrintAndLogEx(SUCCESS, "Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
}
PrintAndLogEx(DEBUG, "DEBUG: Pyramid: checksum : 0x%02X - %02X - %s"