From 465ff3dd25a0bf82f69d3bd74f0c98f9f04491cd Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 8 Jan 2022 12:03:18 -0800 Subject: [PATCH] Fix nvs erase for native build --- src/mesh/NodeDB.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 73e37a7ce..04359aaed 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -87,7 +87,10 @@ bool NodeDB::resetRadioConfig() if (radioConfig.preferences.factory_reset) { DEBUG_MSG("Performing factory reset!\n"); installDefaultDeviceState(); +#ifndef NO_ESP32 + // This will erase what's in NVS including ssl keys, persistant variables and ble pairing nvs_flash_erase(); +#endif didFactoryReset = true; }