fix: harden observer boot and T-Beam S3 telemetry
This commit is contained in:
1 parent
7232afc115
commit
cbfe1cec66
18 files changed
+623
-43
No files matched your search
@@ -53,6 +53,7 @@ void NetworkPrefsStore::setDefaults(NetworkPrefs& prefs) {
|
||||
memset(&prefs, 0, sizeof(prefs));
|
||||
prefs.magic = kMagic;
|
||||
prefs.wifi_powersave = 0;
|
||||
prefs.wifi_channel = 0;
|
||||
}
|
||||
|
||||
bool NetworkPrefsStore::load(FILESYSTEM* fs, NetworkPrefs& prefs,
|
||||
@@ -102,6 +103,9 @@ bool NetworkPrefsStore::load(FILESYSTEM* fs, NetworkPrefs& prefs,
|
||||
if (prefs.wifi_powersave > 2) {
|
||||
prefs.wifi_powersave = 0;
|
||||
}
|
||||
if (prefs.wifi_channel < 1 || prefs.wifi_channel > 14) {
|
||||
prefs.wifi_channel = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user