cargo: keep AP web UI available without STA WiFi

This commit is contained in:
2026-06-22 22:21:51 -06:00
parent fec60b057f
commit e0b56f42e9
2 changed files with 13 additions and 3 deletions
+6
View File
@@ -2,6 +2,12 @@
## Unreleased
### Fixed
- Cargo ESP starts AP and Web UI/API before attempting STA WiFi reconnects.
- STA reconnect attempts now service the web server during short connection windows so AP mode remains usable when no saved WiFi is available.
## Unreleased
### Changed
- Reworked ESP32-S3 dashboard page navigation to use screen-wide LVGL swipe gestures.
- Removed failed temporary double-tap and transparent hitbox navigation experiments.
@@ -1998,8 +1998,10 @@ void connectStaWifi() {
WiFi.begin(staSsids[i].c_str(), staPasswords[i].c_str());
unsigned long start = millis();
while (WiFi.status() != WL_CONNECTED && millis() - start < 10000) {
delay(500);
while (WiFi.status() != WL_CONNECTED && millis() - start < 3000) {
server.handleClient();
oledLoop();
delay(100);
Serial.print(".");
}
@@ -4007,7 +4009,9 @@ void setup() {
startAccessPoint();
oledShowSetupPage();
connectStaWifi();
// Do not block setup on STA WiFi. Start the AP and web server first so the
// local Web UI/API remains available even when no saved WiFi networks exist.
lastStaReconnectAttempt = millis() - STA_RECONNECT_INTERVAL_MS;
server.on("/", HTTP_GET, []() {
server.send_P(200, "text/html", INDEX_HTML);