From 2a432dc6ee7d47f22f80a8a213846e432d70e119 Mon Sep 17 00:00:00 2001 From: Def3nder Date: Wed, 8 Jan 2020 10:35:42 +0100 Subject: [PATCH] Corrected OR function in IF statement from '|' to '||' --- wled00/wled20_ir.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/wled20_ir.ino b/wled00/wled20_ir.ino index bc6265461..d602e4e12 100644 --- a/wled00/wled20_ir.ino +++ b/wled00/wled20_ir.ino @@ -48,11 +48,11 @@ void decodeIR(uint32_t code) if (code == 0xFFFFFFFF) //repeated code, continue brightness up/down { irTimesRepeated++; - if (lastValidCode == IR24_BRIGHTER | lastValidCode == IR40_BPLUS ) + if (lastValidCode == IR24_BRIGHTER || lastValidCode == IR40_BPLUS ) { relativeChange(&bri, 10); colorUpdated(2); } - else if (lastValidCode == IR24_DARKER | lastValidCode == IR40_BMINUS ) + else if (lastValidCode == IR24_DARKER || lastValidCode == IR40_BMINUS ) { relativeChange(&bri, -10, 5); colorUpdated(2); } @@ -64,7 +64,7 @@ void decodeIR(uint32_t code) { relativeChangeWhite(-10, 5); colorUpdated(2); } - else if ((lastValidCode == IR24_ON | lastValidCode == IR40_ON) && irTimesRepeated > 7 ) + else if ((lastValidCode == IR24_ON || lastValidCode == IR40_ON) && irTimesRepeated > 7 ) { nightlightActive = true; nightlightStartTime = millis();