Add new factory_reset preferences option clients can set

This commit is contained in:
geeksville
2020-09-19 11:19:42 -07:00
parent bd126b866c
commit 3c0429deee
8 changed files with 52 additions and 21 deletions
+4 -2
View File
@@ -197,12 +197,14 @@ void MeshService::loop()
}
/// The radioConfig object just changed, call this to force the hw to change to the new settings
void MeshService::reloadConfig()
bool MeshService::reloadConfig()
{
// If we can successfully set this radio to these settings, save them to disk
nodeDB.resetRadioConfig(); // Don't let the phone send us fatally bad settings
bool didReset = nodeDB.resetRadioConfig(); // Don't let the phone send us fatally bad settings
configChanged.notifyObservers(NULL);
nodeDB.saveToDisk();
return didReset;
}
/// The owner User record just got updated, update our node DB and broadcast the info into the mesh