From d76b9d0d70bef6cfdc5ebc84e31d37e6d2fa0895 Mon Sep 17 00:00:00 2001 From: kajksa Date: Mon, 7 Mar 2016 17:03:25 +0100 Subject: [PATCH] Clearer code --- src/devices/quhwa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/quhwa.c b/src/devices/quhwa.c index fa4887c5..f816ae24 100644 --- a/src/devices/quhwa.c +++ b/src/devices/quhwa.c @@ -27,8 +27,8 @@ static int quhwa_callback(bitbuffer_t *bitbuffer) { unsigned bits = bitbuffer->bits_per_row[0]; if ((bits == 18) && - ((b[1] & 1) && (b[1] & 2)) && // Last two bits of second byte are one - (b[2]==0xFF)) // Last two bits are one + ((b[1] & 0x03) == 0x03) && + ((b[2] & 0xC0) == 0xC0)) { uint32_t ID = (b[0] << 8) | b[1]; data_t *data;