From dc1b03ec6418ff88b9e24503c291801f86c539ec Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 18:33:21 -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 52431b5..9b95f53 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -474,7 +474,7 @@ namespace ratgdo { void RATGDOComponent::openDoor() { - if (this->doorState == "open" || this->doorState == "opening") { + if(this->doorStates[this->store_.doorState] == "open" || doorStates[this->store_.doorState] == "opening"){ ESP_LOGD(TAG, "The door is already %s", doorState); return; } @@ -488,7 +488,7 @@ namespace ratgdo { void RATGDOComponent::closeDoor() { - if (this->doorState == "closed" || this->doorState == "closing") { + if(this->doorStates[this->store_.doorState] == "closed" || doorStates[this->store_.doorState] == "closing"){ ESP_LOGD(TAG, "The door is already %s", this->doorState); return; } @@ -501,7 +501,7 @@ namespace ratgdo { } void RATGDOComponent::stopDoor(){ - if(doorStates[doorState] == "opening" || doorStates[doorState] == "closing"){ + if(this->doorStates[this->store_.doorState] == "opening" || doorStates[this->store_.doorState] == "closing"){ toggleDoor(); }else{ Serial.print("The door is not moving."); @@ -512,12 +512,12 @@ namespace ratgdo { { if (this->useRollingCodes_) { getRollingCode("door1"); - transmit(this->rollingCode); + transmit(this->txRollingCode); delay(40); getRollingCode("door2"); - transmit(this->rollingCode); + transmit(this->txRollingCode); this->pref_.save(&this->rollingCodeCounter); } else { @@ -531,7 +531,7 @@ namespace ratgdo { { if (this->useRollingCodes_) { getRollingCode("light"); - transmit(this->rollingCode); + transmit(this->txRollingCode); this->pref_.save(&this->rollingCodeCounter); } else { sendSyncCodes();