cargo: keep AP web UI available without STA WiFi
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
## Unreleased
|
## 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
|
### Changed
|
||||||
- Reworked ESP32-S3 dashboard page navigation to use screen-wide LVGL swipe gestures.
|
- Reworked ESP32-S3 dashboard page navigation to use screen-wide LVGL swipe gestures.
|
||||||
- Removed failed temporary double-tap and transparent hitbox navigation experiments.
|
- 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());
|
WiFi.begin(staSsids[i].c_str(), staPasswords[i].c_str());
|
||||||
|
|
||||||
unsigned long start = millis();
|
unsigned long start = millis();
|
||||||
while (WiFi.status() != WL_CONNECTED && millis() - start < 10000) {
|
while (WiFi.status() != WL_CONNECTED && millis() - start < 3000) {
|
||||||
delay(500);
|
server.handleClient();
|
||||||
|
oledLoop();
|
||||||
|
delay(100);
|
||||||
Serial.print(".");
|
Serial.print(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4007,7 +4009,9 @@ void setup() {
|
|||||||
startAccessPoint();
|
startAccessPoint();
|
||||||
oledShowSetupPage();
|
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.on("/", HTTP_GET, []() {
|
||||||
server.send_P(200, "text/html", INDEX_HTML);
|
server.send_P(200, "text/html", INDEX_HTML);
|
||||||
|
|||||||
Reference in New Issue
Block a user