From 7b8444a30579790c94816868bcb3d0f4d33a5d5f Mon Sep 17 00:00:00 2001 From: Bluechip Date: Sat, 20 Jun 2015 17:51:40 +0100 Subject: [PATCH] Remove use of macro TOPBIT --- ir_Aiwa.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ir_Aiwa.cpp b/ir_Aiwa.cpp index b34d6f4..b4049ca 100644 --- a/ir_Aiwa.cpp +++ b/ir_Aiwa.cpp @@ -46,15 +46,15 @@ void IRsend::sendAiwaRCT501 (int code) //-v- THIS CODE LOOKS LIKE IT MIGHT BE WRONG - CHECK! // it only send 15bits and ignores the top bit -// then uses TOPBIT which is bit-31 to check the bit code +// then uses TOPBIT which is 0x80000000 to check the bit code // I suspect TOPBIT should be changed to 0x00008000 // Skip firts code bit code <<= 1; // Send code for (int i = 0; i < 15; i++) { mark(AIWA_RC_T501_BIT_MARK); - if (code & TOPBIT) space(AIWA_RC_T501_ONE_SPACE) ; - else space(AIWA_RC_T501_ZERO_SPACE) ; + if (code & 0x80000000) space(AIWA_RC_T501_ONE_SPACE) ; + else space(AIWA_RC_T501_ZERO_SPACE) ; code <<= 1; } //-^- THIS CODE LOOKS LIKE IT MIGHT BE WRONG - CHECK!