simplify and remove 2 as a wifi enabled state

This commit is contained in:
liamcottle committed 2026-09-08 21:30:17 +12:00
1 parent 24b2e5e03d
commit 5be7b3c4ba
3 files changed
+8 -11

No files matched your search

+3 -3
View File
@@ -218,9 +218,9 @@ void setup() {
strcpy(wifi_ssid, the_mesh.getNodePrefs()->wifi_ssid);
strcpy(wifi_pwd, the_mesh.getNodePrefs()->wifi_pwd);
}
// 'set wifi.enabled 0', or no SSID from either prefs or the build, leaves the radio off entirely
wifi_enabled = the_mesh.getNodePrefs()->wifiEnabled();
if (wifi_enabled) {
// only start wifi if enabled and ssid is not empty
wifi_enabled = the_mesh.getNodePrefs()->wifi_enabled;
if (wifi_enabled && wifi_ssid[0]) {
#if defined(ESP32)
board.setInhibitSleep(true); // prevent sleep when WiFi is active
WiFi.setAutoReconnect(true);