This commit is contained in:
J. Nick Koston 2023-06-05 13:51:39 -05:00
parent 799c1ee9c9
commit f4a76357e9
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ void IRAM_ATTR RATGDOComponent::isrDebounce(const char *type) {
if (strcmp(type, "openDoor") == 0) {
if (digitalRead(TRIGGER_OPEN) == LOW) {
// save the time of the falling edge
this->lastOpenDoorTime = currentMillis;
lastOpenDoorTime = currentMillis;
} else if (currentMillis - lastOpenDoorTime > 500 &&
currentMillis - lastOpenDoorTime < 10000) {
// now see if the rising edge was between 500ms and 10 seconds after the
@ -191,7 +191,7 @@ void IRAM_ATTR RATGDOComponent::isrDebounce(const char *type) {
if (strcmp(type, "toggleLight") == 0) {
if (digitalRead(TRIGGER_LIGHT) == LOW) {
// save the time of the falling edge
this->lastToggleLightTime = currentMillis;
lastToggleLightTime = currentMillis;
} else if (currentMillis - lastToggleLightTime > 500 &&
currentMillis - lastToggleLightTime < 10000) {
// now see if the rising edge was between 500ms and 10 seconds after the