mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
allow toggling wifi enabled regardless of stored ssid
This commit is contained in:
@@ -2188,14 +2188,9 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp, char*
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (memcmp(command, "set wifi.enabled ", 17) == 0) {
|
if (memcmp(command, "set wifi.enabled ", 17) == 0) {
|
||||||
uint8_t en = atoi(&command[17]) ? 1 : 0;
|
_prefs.wifi_enabled = atoi(&command[17]) ? 1 : 0;
|
||||||
if (en && !_prefs.wifiSSID()[0]) {
|
|
||||||
strcpy(reply, "> set wifi.ssid first");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
_prefs.wifi_enabled = en;
|
|
||||||
savePrefs();
|
savePrefs();
|
||||||
sprintf(reply, "> wifi.enabled is now %d (reboot to apply)", en);
|
sprintf(reply, "> wifi.enabled is now %d (reboot to apply)", _prefs.wifi_enabled);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (strcmp(command, "get wifi.enabled") == 0) {
|
if (strcmp(command, "get wifi.enabled") == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user