mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix detection of GProx II cards and false detection of other cards as GProx II
This commit is contained in:
@@ -39,11 +39,12 @@ void protocol_gproxii_free(ProtocolGProxII* protocol) {
|
||||
}
|
||||
|
||||
uint8_t* protocol_gproxii_get_data(ProtocolGProxII* proto) {
|
||||
return proto->data;
|
||||
return proto->decoded_data;
|
||||
}
|
||||
|
||||
void protocol_gproxii_decoder_start(ProtocolGProxII* protocol) {
|
||||
memset(protocol->data, 0, GPROXII_ENCODED_BYTE_FULL_SIZE);
|
||||
memset(protocol->decoded_data, 0, GPROXII_DATA_SIZE);
|
||||
protocol->last_short = false;
|
||||
}
|
||||
|
||||
@@ -88,7 +89,7 @@ static bool protocol_gproxii_can_be_decoded(ProtocolGProxII* protocol) {
|
||||
if(bit_lib_get_bits(protocol->data, 0, 6) != 0b111110) return false;
|
||||
|
||||
// Check always 0 parity on every 5th bit after preamble
|
||||
if(bit_lib_test_parity(protocol->data, 5, GPROXII_ENCODED_BIT_SIZE, BitLibParityAlways0, 5))
|
||||
if(!bit_lib_test_parity(protocol->data, 5, GPROXII_ENCODED_BIT_SIZE, BitLibParityAlways0, 5)) {
|
||||
return false;
|
||||
|
||||
// Start GProx II decode
|
||||
|
||||
Reference in New Issue
Block a user