fix: only clear storageDirtyMsk bits when no errors, extend RTOS queues (#5923)
This commit is contained in:
@@ -70,8 +70,8 @@ extern uint32_t SystemCoreClock;
|
|||||||
|
|
||||||
/* Software timer definitions. */
|
/* Software timer definitions. */
|
||||||
#define configTIMER_TASK_PRIORITY ( 2 )
|
#define configTIMER_TASK_PRIORITY ( 2 )
|
||||||
#define configTIMER_QUEUE_LENGTH 10
|
#define configTIMER_QUEUE_LENGTH 20
|
||||||
#define configTIMER_TASK_STACK_DEPTH ( 512 )
|
#define configTIMER_TASK_STACK_DEPTH ( 1024 )
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|||||||
@@ -82,27 +82,30 @@ void storageCheck(bool immediately)
|
|||||||
|
|
||||||
if (storageDirtyMsk & EE_GENERAL) {
|
if (storageDirtyMsk & EE_GENERAL) {
|
||||||
TRACE("eeprom write general");
|
TRACE("eeprom write general");
|
||||||
storageDirtyMsk &= ~EE_GENERAL;
|
|
||||||
const char * error = writeGeneralSettings();
|
const char * error = writeGeneralSettings();
|
||||||
if (error) {
|
if (error) {
|
||||||
TRACE("writeGeneralSettings error=%s", error);
|
TRACE("writeGeneralSettings error=%s", error);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
storageDirtyMsk &= ~EE_GENERAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(STORAGE_MODELSLIST)
|
#if defined(STORAGE_MODELSLIST)
|
||||||
if (storageDirtyMsk & EE_LABELS) {
|
if (storageDirtyMsk & EE_LABELS) {
|
||||||
TRACE("SD card write labels");
|
TRACE("SD card write labels");
|
||||||
storageDirtyMsk &= ~EE_LABELS;
|
|
||||||
const char * error = modelslist.save();
|
const char * error = modelslist.save();
|
||||||
if (error) {
|
if (error) {
|
||||||
TRACE("writeLabels error=%s", error);
|
TRACE("writeLabels error=%s", error);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
storageDirtyMsk &= ~EE_LABELS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (storageDirtyMsk & EE_MODEL) {
|
if (storageDirtyMsk & EE_MODEL) {
|
||||||
TRACE("eeprom write model");
|
TRACE("eeprom write model");
|
||||||
storageDirtyMsk &= ~EE_MODEL;
|
|
||||||
const char * error = writeModel();
|
const char * error = writeModel();
|
||||||
#if defined(STORAGE_MODELSLIST)
|
#if defined(STORAGE_MODELSLIST)
|
||||||
modelslist.updateCurrentModelCell();
|
modelslist.updateCurrentModelCell();
|
||||||
@@ -110,6 +113,9 @@ void storageCheck(bool immediately)
|
|||||||
if (error) {
|
if (error) {
|
||||||
TRACE("writeModel error=%s", error);
|
TRACE("writeModel error=%s", error);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
storageDirtyMsk &= ~EE_MODEL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user