From 32069950b0ea76f73bdf08702742092562c42c38 Mon Sep 17 00:00:00 2001 From: nick Date: Thu, 4 Jun 2026 14:01:15 -0600 Subject: [PATCH] Trim WiFi credentials from setup commands --- .../esp32/overland-controller/overland-controller.ino | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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;