Update usermod_PIR_sensor_switch.h

Current: If I disable PIR after it switch strip on, it'll switch off by timer.
Update: If I disable PIR after it switch strip on, it'll keep strip on.
pull/1255/head
guilhermebera 2020-10-14 01:07:20 -03:00 zatwierdzone przez GitHub
rodzic 13f18492ad
commit fb6b2cbfa2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -99,7 +99,9 @@ class PIRsensorSwitch : public Usermod {
*/
bool handleOffTimer() {
if (m_offTimerStart > 0 && millis() - m_offTimerStart > m_switchOffDelay) {
switchStrip(false);
if (m_PIRenabled == true){
switchStrip(false);
}
m_offTimerStart = 0;
return true;
}