fix: only clear storageDirtyMsk bits when no errors, extend RTOS queues (#5923)
This commit is contained in:
@@ -82,27 +82,30 @@ void storageCheck(bool immediately)
|
||||
|
||||
if (storageDirtyMsk & EE_GENERAL) {
|
||||
TRACE("eeprom write general");
|
||||
storageDirtyMsk &= ~EE_GENERAL;
|
||||
const char * error = writeGeneralSettings();
|
||||
if (error) {
|
||||
TRACE("writeGeneralSettings error=%s", error);
|
||||
}
|
||||
else {
|
||||
storageDirtyMsk &= ~EE_GENERAL;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(STORAGE_MODELSLIST)
|
||||
if (storageDirtyMsk & EE_LABELS) {
|
||||
TRACE("SD card write labels");
|
||||
storageDirtyMsk &= ~EE_LABELS;
|
||||
const char * error = modelslist.save();
|
||||
if (error) {
|
||||
TRACE("writeLabels error=%s", error);
|
||||
}
|
||||
else {
|
||||
storageDirtyMsk &= ~EE_LABELS;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (storageDirtyMsk & EE_MODEL) {
|
||||
TRACE("eeprom write model");
|
||||
storageDirtyMsk &= ~EE_MODEL;
|
||||
const char * error = writeModel();
|
||||
#if defined(STORAGE_MODELSLIST)
|
||||
modelslist.updateCurrentModelCell();
|
||||
@@ -110,6 +113,9 @@ void storageCheck(bool immediately)
|
||||
if (error) {
|
||||
TRACE("writeModel error=%s", error);
|
||||
}
|
||||
else {
|
||||
storageDirtyMsk &= ~EE_MODEL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user