From 3fddba95d42083cad435bfd7fe761edaeefe5a5c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 13:49:40 -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 8950dbb..5043f0b 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -395,7 +395,7 @@ void RATGDOComponent::sync() { transmit(this->rollingCode, CODE_LENGTH); delay(45); - writeCounterToFlash(); + this->pref_.save(&this->rollingCodeCounter); } void RATGDOComponent::openDoor() { @@ -417,7 +417,7 @@ void RATGDOComponent::openDoor() { getRollingCode("door2"); transmit(this->rollingCode, CODE_LENGTH); - writeCounterToFlash(); + this->pref_.save(&this->rollingCodeCounter); } else { for (int i = 0; i < 4; i++) { ESP_LOGD(TAG, "sync_code[%d]", i);