From 46719eecb74b1aca7d55e4ff22cf34b71d0a8252 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Fri, 5 Dec 2025 04:49:13 +0300 Subject: [PATCH] settings(embedis): missing condition for commit() previous write() impl relied on comparing values before and after assume that operations resulting in commit() are always written --- code/espurna/settings.h | 1 + code/espurna/storage_eeprom.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/code/espurna/settings.h b/code/espurna/settings.h index 893c32c7..6471e5da 100644 --- a/code/espurna/settings.h +++ b/code/espurna/settings.h @@ -81,6 +81,7 @@ public: } void commit() const { + _instance->setDirty(); autosaveSettings(); } diff --git a/code/espurna/storage_eeprom.h b/code/espurna/storage_eeprom.h index 895434b3..c688bdd6 100644 --- a/code/espurna/storage_eeprom.h +++ b/code/espurna/storage_eeprom.h @@ -30,6 +30,10 @@ public: return _data; } + void setDirty() { + _dirty = true; + } + // fill all of the available storage with the 'value' void fill(uint8_t);