mirror of
https://github.com/merbanan/rtl_433.git
synced 2026-04-19 17:16:56 -04:00
Fix Chuango devices with some zeroes in their ID (#2205)
This commit is contained in:
committed by
GitHub
parent
e066b669f7
commit
151dfe79a5
@@ -48,7 +48,7 @@ static int chuango_callback(r_device *decoder, bitbuffer_t *bitbuffer)
|
||||
|
||||
// Validate package
|
||||
if (!(b[3] & 0x80) // Last bit (MSB here) is always 1
|
||||
|| !b[0] || !b[1] || !(b[2] & 0xF0)) // Reduce false positives. ID 0x00000 not supported
|
||||
|| (!b[0] && !b[1] && !(b[2] & 0xF0))) // Reduce false positives. ID 0x00000 not supported
|
||||
return DECODE_ABORT_EARLY;
|
||||
|
||||
id = (b[0] << 12) | (b[1] << 4) | (b[2] >> 4); // ID is 20 bits (Ad: "1 Million combinations" :-)
|
||||
|
||||
Reference in New Issue
Block a user