diff --git a/include/configmanager.h b/include/configmanager.h index e9c5e7c0..a8be749c 100644 --- a/include/configmanager.h +++ b/include/configmanager.h @@ -7,7 +7,7 @@ extern configData_t cfg; -void saveConfig(bool erase = false); +void saveConfig(bool erase); bool loadConfig(void); void eraseConfig(void); int version_compare(const String v1, const String v2); diff --git a/src/bmesensor.cpp b/src/bmesensor.cpp index 6baa0f1c..eada87ff 100644 --- a/src/bmesensor.cpp +++ b/src/bmesensor.cpp @@ -197,7 +197,7 @@ void updateState(void) { memcpy(cfg.bsecstate, bsecstate_buffer, BSEC_MAX_STATE_BLOB_SIZE); cfg.bsecstate[BSEC_MAX_STATE_BLOB_SIZE] = BSEC_MAX_STATE_BLOB_SIZE; ESP_LOGI(TAG, "saving BSEC state to NVRAM"); - saveConfig(); + saveConfig(false); } } #endif