IR remotes can disable NightLight with "OFF" (#745)

* IR can disable Nightlight with "OFF"
This commit is contained in:
Def3nder 2020-03-02 12:41:14 +01:00 committed by GitHub
parent b804101c24
commit b86f58befe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,6 @@ bool colorChanged()
{ {
if (col[i] != colIT[i]) return true; if (col[i] != colIT[i]) return true;
if (colSec[i] != colSecIT[i]) return true; if (colSec[i] != colSecIT[i]) return true;
//if (col[i] != colNlT[i]) return true; (this effectively made the ESP send out sync packets every time colorUpdated() is called, even if nothing changed)
} }
if (bri != briIT) return true; if (bri != briIT) return true;
return false; return false;

View File

@ -91,6 +91,7 @@ void decodeIR(uint32_t code)
default: return; default: return;
} }
} }
if (nightlightActive && bri == 0) nightlightActive = false;
colorUpdated(NOTIFIER_CALL_MODE_BUTTON); //for notifier, IR is considered a button input colorUpdated(NOTIFIER_CALL_MODE_BUTTON); //for notifier, IR is considered a button input
//code <= 0xF70000 also invalid //code <= 0xF70000 also invalid
} }