From f4a76357e99c07b54922faa45f48b3664da569a1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 13:51:39 -0500 Subject: [PATCH] fix --- components/ratgdo/ratgdo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 8b09268..638ece6 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -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