New strategy for updating data storage

This commit is contained in:
Gunnar Skjold
2024-03-23 09:12:58 +01:00
parent 6c1401d042
commit 5022f42692
2 changed files with 4 additions and 10 deletions

View File

@@ -1316,9 +1316,10 @@ void handleDataSuccess(AmsData* data) {
#if defined(ESP32)
if(saveData && cloud != NULL) cloud->forceUpdate();
#endif
} else if(tm.Minute == 1 && meterState.getListType() >= 3) {
debugV_P(PSTR(" using estimated data"));
saveData = ds.update(&meterState);
} else if(tm.Minute == 1) {
debugV_P(PSTR(" no data, clear"));
AmsData nullData;
saveData = ds.update(&nullData);
}
if(saveData) {
debugI_P(PSTR("Saving data"));