From 8d4d957618e67699672cce7a6f8731f154249222 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 9 Jun 2023 14:44:53 -0500 Subject: [PATCH] fix --- components/ratgdo/ratgdo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 0475965..a14b7a1 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -316,10 +316,12 @@ namespace ratgdo { this->rxRollingCode[byteCount] = serData; byteCount++; - if (byteCount == 19) { + if (byteCount == CODE_LENGTH) { reading = false; msgStart = 0; byteCount = 0; + isStatus = false; + readRollingCode(isStatus, this->doorState, this->lightState, this->lockState, this->motionState, this->obstructionState, this->motorState); if (isStatus && this->forceUpdate_) { this->forceUpdate_ = false; @@ -327,7 +329,6 @@ namespace ratgdo { this->previousLightState = LightState::LIGHT_STATE_UNKNOWN; this->previousLockState = LockState::LOCK_STATE_UNKNOWN; } - isStatus = false; } } }