Cleanup when to persist

This commit is contained in:
Rob Giseburt
2019-11-04 11:07:47 -05:00
parent add4bb778c
commit 3cfff7bd16
3 changed files with 11 additions and 11 deletions

View File

@@ -140,9 +140,9 @@ static void _set_defa(nvObj_t *nv, bool print)
}
strncpy(nv->token, cfgArray[nv->index].token, TOKEN_LEN);
cfgArray[nv->index].set(nv); // run the set method, nv_set(nv);
if (cfgArray[nv->index].flags & F_PERSIST) {
nv_persist(nv);
}
// if (cfgArray[nv->index].flags & F_PERSIST) {
// nv_persist(nv);
// }
}
}
sr_init_status_report(); // reset status reports

View File

@@ -130,9 +130,9 @@ stat_t read_persistent_value(nvObj_t *nv)
stat_t write_persistent_value(nvObj_t *nv)
{
if (read_persistent_value(nv) != STAT_OK) {
// if (read_persistent_value(nv) != STAT_OK) {
nvm.changed_nv_indexes[nvm.changed_nvs++] = nv->index;
}
// }
return (STAT_OK);
}

View File

@@ -204,7 +204,7 @@ void sr_init_status_report()
return;
}
nv_set(nv);
nv_persist(nv); // conditionally persist - automatic by nv_persist()
// nv_persist(nv); // conditionally persist - automatic by nv_persist()
nv->index++; // increment SR NVM index
}
}