From 949ca44df09b756702ef4cd67ef541da20a24b35 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 16:35:38 -0500 Subject: [PATCH] fix --- components/ratgdo/ratgdo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index fd1b790..b9bbb10 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -292,7 +292,7 @@ namespace ratgdo { // If the previous and the current state of the RPM2 Signal are different, // that means there is a rotary encoder detected and the door is moving - if (this->doorPositionCounter != lastDoorPositionCounter) { + if (this->store_.doorPositionCounter != lastDoorPositionCounter) { rotaryEncoderDetected = true; // this disables the reed switch handler lastCounterMillis = millis(); @@ -300,19 +300,19 @@ namespace ratgdo { } // Wait 5 pulses before updating to door opening status - if (this->doorPositionCounter - lastDirectionChangeCounter > 5) { + if (this->store_.>doorPositionCounter - lastDirectionChangeCounter > 5) { if (this->doorState != "opening") { ESP_LOGD(TAG, "Door Opening..."); } - lastDirectionChangeCounter = this->doorPositionCounter; + lastDirectionChangeCounter = this->store_.doorPositionCounter; this->doorState = "opening"; } - if (lastDirectionChangeCounter - this->doorPositionCounter > 5) { + if (lastDirectionChangeCounter - this->store_.doorPositionCounter > 5) { if (this->doorState != "closing") { ESP_LOGD(TAG, "Door Closing..."); } - lastDirectionChangeCounter = this->doorPositionCounter; + lastDirectionChangeCounter = this->store_.doorPositionCounter; this->doorState = "closing"; } @@ -333,7 +333,7 @@ namespace ratgdo { } } - lastDoorPositionCounter = doorPositionCounter; + lastDoorPositionCounter = this->store_.doorPositionCounter; }