From ebc77fd3b67b8a8c2b5fa14dcd709f24bb10212e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 19:04:31 -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 421f6e2..237f419 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -34,7 +34,7 @@ namespace ratgdo { if (!arg->trigger_open.digital_read()) { // save the time of the falling edge lastOpenDoorTime = currentMillis; - } else if (currentMillis - arg->lastOpenDoorTime > 500 && currentMillis - lastOpenDoorTime < 10000) { + } else if (currentMillis - lastOpenDoorTime > 500 && currentMillis - lastOpenDoorTime < 10000) { // now see if the rising edge was between 500ms and 10 seconds after the // falling edge arg->dryContactDoorOpen = true; @@ -52,7 +52,7 @@ namespace ratgdo { if (!arg->trigger_close.digital_read()) { // save the time of the falling edge lastCloseDoorTime = currentMillis; - } else if (currentMillis - arg->lastCloseDoorTime > 500 && currentMillis - lastCloseDoorTime < 10000) { + } else if (currentMillis - lastCloseDoorTime > 500 && currentMillis - lastCloseDoorTime < 10000) { // now see if the rising edge was between 500ms and 10 seconds after the // falling edge arg->dryContactDoorClose = true;