Corrected OR function in IF statement
from '|' to '||'
This commit is contained in:
parent
322d1f09de
commit
2a432dc6ee
@ -48,11 +48,11 @@ void decodeIR(uint32_t code)
|
|||||||
if (code == 0xFFFFFFFF) //repeated code, continue brightness up/down
|
if (code == 0xFFFFFFFF) //repeated code, continue brightness up/down
|
||||||
{
|
{
|
||||||
irTimesRepeated++;
|
irTimesRepeated++;
|
||||||
if (lastValidCode == IR24_BRIGHTER | lastValidCode == IR40_BPLUS )
|
if (lastValidCode == IR24_BRIGHTER || lastValidCode == IR40_BPLUS )
|
||||||
{
|
{
|
||||||
relativeChange(&bri, 10); colorUpdated(2);
|
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);
|
relativeChange(&bri, -10, 5); colorUpdated(2);
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ void decodeIR(uint32_t code)
|
|||||||
{
|
{
|
||||||
relativeChangeWhite(-10, 5); colorUpdated(2);
|
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;
|
nightlightActive = true;
|
||||||
nightlightStartTime = millis();
|
nightlightStartTime = millis();
|
||||||
|
Loading…
Reference in New Issue
Block a user