don't let phones send down fatally invalid RadioConfig records

and if a phone did in the past, fixup the garbage we saved in flash
This commit is contained in:
geeksville
2020-03-30 16:05:28 -07:00
parent a73f466473
commit 7dabad1b70
4 changed files with 36 additions and 23 deletions

View File

@@ -217,6 +217,7 @@ void MeshService::loop()
void 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
radio.reloadConfig();
nodeDB.saveToDisk();
}