From 57b0f2bbd99f67ffda41c20192ee732beb43ffe6 Mon Sep 17 00:00:00 2001 From: Tommy Vestermark Date: Sat, 22 Aug 2015 11:55:20 +0200 Subject: [PATCH] Chuango: Reduce false positives --- src/devices/chuango.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devices/chuango.c b/src/devices/chuango.c index 11562aba..68434891 100644 --- a/src/devices/chuango.c +++ b/src/devices/chuango.c @@ -26,9 +26,10 @@ static int chuango_callback(bitbuffer_t *bitbuffer) { // Validate package if ((bits == 25) && (b[3] && 0x80) // Last bit is always 1 + && (b[0] != 0xFF) && (b[1] != 0xFF) && (b[2] != 0xFF) // Reduce false positives. ID 0xFFFFF not supported ) { uint32_t ID = (b[0] << 12) | (b[1] << 4) | (b[2] >> 4); // ID is 20 bits (Ad: "1 Million combinations" :-) - char *CMD; + char *CMD; switch(b[2] & 0x0F) { case 0x0: CMD = "0x0 (?)"; break; case 0x1: CMD = "0x1 (?)"; break;