debug: disable STA reconnect during LilyGO bringup
This commit is contained in:
@@ -24,3 +24,6 @@
|
|||||||
|
|
||||||
#define DASHBOARD_UART_ENABLED 0
|
#define DASHBOARD_UART_ENABLED 0
|
||||||
#define DASHBOARD_UART_BAUD 115200
|
#define DASHBOARD_UART_BAUD 115200
|
||||||
|
|
||||||
|
// Bring-up safety: keep AP stable while validating LilyGO hardware.
|
||||||
|
#define WIFI_STA_AUTOCONNECT_ENABLED 0
|
||||||
|
|||||||
@@ -2127,6 +2127,9 @@ void connectStaWifi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void maintainStaWifi() {
|
void maintainStaWifi() {
|
||||||
|
#if !WIFI_STA_AUTOCONNECT_ENABLED
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
if (wifiNetworkCount <= 0) return;
|
if (wifiNetworkCount <= 0) return;
|
||||||
|
|
||||||
if (WiFi.status() == WL_CONNECTED) return;
|
if (WiFi.status() == WL_CONNECTED) return;
|
||||||
@@ -4182,15 +4185,10 @@ void setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
Serial.println("LOOP: server");
|
|
||||||
server.handleClient();
|
server.handleClient();
|
||||||
Serial.println("LOOP: wifi");
|
|
||||||
maintainStaWifi();
|
maintainStaWifi();
|
||||||
Serial.println("LOOP: debug");
|
|
||||||
handleDebugSerial();
|
handleDebugSerial();
|
||||||
Serial.println("LOOP: bms");
|
|
||||||
updateBms();
|
updateBms();
|
||||||
Serial.println("LOOP: alarms");
|
|
||||||
updateAlarms();
|
updateAlarms();
|
||||||
#if DASHBOARD_UART_ENABLED
|
#if DASHBOARD_UART_ENABLED
|
||||||
pollDashboardUart();
|
pollDashboardUart();
|
||||||
@@ -4200,7 +4198,6 @@ void loop() {
|
|||||||
static unsigned long lastSensorUpdate = 0;
|
static unsigned long lastSensorUpdate = 0;
|
||||||
|
|
||||||
if (millis() - lastSensorUpdate > 5000) {
|
if (millis() - lastSensorUpdate > 5000) {
|
||||||
Serial.println("LOOP: sensors");
|
|
||||||
updateSensors();
|
updateSensors();
|
||||||
lastSensorUpdate = millis();
|
lastSensorUpdate = millis();
|
||||||
logDebug("Sensor Update");
|
logDebug("Sensor Update");
|
||||||
|
|||||||
Reference in New Issue
Block a user