diff --git a/firmware/esp32/overland-controller/overland-controller.ino b/firmware/esp32/overland-controller/overland-controller.ino index 89cbc53..2f8ed17 100644 --- a/firmware/esp32/overland-controller/overland-controller.ino +++ b/firmware/esp32/overland-controller/overland-controller.ino @@ -1051,7 +1051,9 @@ void handleDebugSerial() { if (command.startsWith("wifi ssid ")) { - staSsids[0] = command.substring(10); + String ssid = command.substring(10); + ssid.trim(); + staSsids[0] = ssid; staPriorities[0] = 1; if (wifiNetworkCount < 1) wifiNetworkCount = 1; Serial.println("OK WiFi SSID 1 updated"); @@ -1060,7 +1062,9 @@ void handleDebugSerial() { } if (command.startsWith("wifi pass ")) { - staPasswords[0] = command.substring(10); + String password = command.substring(10); + password.trim(); + staPasswords[0] = password; staPriorities[0] = 1; if (wifiNetworkCount < 1) wifiNetworkCount = 1; Serial.println("OK WiFi password 1 updated"); @@ -1094,6 +1098,9 @@ void handleDebugSerial() { if (priority <= 0) priority = wifiNetworkCount + 1; } + ssid.trim(); + password.trim(); + staSsids[wifiNetworkCount] = ssid; staPasswords[wifiNetworkCount] = password; staPriorities[wifiNetworkCount] = priority;