diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index e5a9a06..c303be6 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -133,8 +133,7 @@ namespace ratgdo { this->input_obst_pin_->attach_interrupt(RATGDOStore::isrObstruction, &this->store_, gpio::INTERRUPT_ANY_EDGE); ESP_LOGD(TAG, "Syncing rolling code counter after reboot..."); - sync(); // if rolling codes are being used (rolling code counter > 0), send - // reboot/sync to the opener on startup + sync(); // reboot/sync to the opener on startup } void RATGDOComponent::loop() @@ -150,7 +149,6 @@ namespace ratgdo { void RATGDOComponent::dump_config() { ESP_LOGCONFIG(TAG, "Setting up RATGDO..."); - sync(); } void RATGDOComponent::readRollingCode(uint8_t& door, uint8_t& light, uint8_t& lock, uint8_t& motion, uint8_t& obstruction) diff --git a/components/ratgdo/ratgdo.h b/components/ratgdo/ratgdo.h index cf03bb9..427e775 100644 --- a/components/ratgdo/ratgdo.h +++ b/components/ratgdo/ratgdo.h @@ -60,7 +60,7 @@ namespace ratgdo { void dump_config() override; /********************************** GLOBAL VARS * *****************************************/ - unsigned int rollingCodeCounter; + uint32_t rollingCodeCounter; uint8_t txRollingCode[CODE_LENGTH]; uint8_t rxRollingCode[CODE_LENGTH]; String doorStates[6] = { "unknown", "open", "closed", "stopped", "opening", "closing" };