diff --git a/base.yaml b/base.yaml index 6b4e752..86fb629 100644 --- a/base.yaml +++ b/base.yaml @@ -8,7 +8,7 @@ external_components: refresh: 1s preferences: - flash_write_interval: 5s + flash_write_interval: 1min ratgdo: id: ${id_prefix} diff --git a/base_secplusv1.yaml b/base_secplusv1.yaml index 089f779..18a61b6 100644 --- a/base_secplusv1.yaml +++ b/base_secplusv1.yaml @@ -7,7 +7,7 @@ external_components: refresh: 1s preferences: - flash_write_interval: 5s + flash_write_interval: 1min ratgdo: id: ${id_prefix} diff --git a/components/ratgdo/secplus2.cpp b/components/ratgdo/secplus2.cpp index aed61df..3619db8 100644 --- a/components/ratgdo/secplus2.cpp +++ b/components/ratgdo/secplus2.cpp @@ -15,14 +15,14 @@ namespace ratgdo { namespace secplus2 { // MAX_CODES_WITHOUT_FLASH_WRITE is a bit of a guess - // since we write the flash at most every every 5s + // since we write the flash at most every every 1min // // We want the rolling counter to be high enough that the // GDO will accept the command after an unexpected reboot // that did not save the counter to flash in time which // results in the rolling counter being behind what the GDO // expects. - static const uint8_t MAX_CODES_WITHOUT_FLASH_WRITE = 10; + static const uint8_t MAX_CODES_WITHOUT_FLASH_WRITE = 60; static const char* const TAG = "ratgdo_secplus2";