Mask facilityCode and cardCode, just for safety
doesn't matter with their current types, but it doesn't really hurt either
This commit is contained in:
parent
c7d0b6b747
commit
1322667762
@ -71,8 +71,8 @@ void loop()
|
||||
// P: parity bit, F: facility code, C: card code
|
||||
// PFFFFFFFFCCCCCCCCCCCCCCCCP
|
||||
if (bitCount == 26) {
|
||||
uint8_t facilityCode = (data >> 17);
|
||||
uint16_t cardCode = (data >> 1);
|
||||
uint8_t facilityCode = (data >> 17) & 0xFF;
|
||||
uint16_t cardCode = (data >> 1) & 0xFFFF;
|
||||
// TODO: check parity bits
|
||||
|
||||
Keyboard.print(facilityCode);
|
||||
|
Loading…
Reference in New Issue
Block a user