From 790ae99d5c33ff05645c88cf4c0ff12972d8d392 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 3 Mar 2024 07:44:18 -0500 Subject: [PATCH] Add delay before WiFi startup In #256 a user reports intermittant issues at boot with his board which appear likely due to a bad power supply. This attempts to give the power supply time to recharge any attached capacitors between initializing the LCD and initializing the WiFi --- .github/workflows/build.yml | 2 +- src/wifi_setup.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5bcac4f..735450a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - no_std_strings + - slow_load # tags: # - "v*" # pull_request: diff --git a/src/wifi_setup.cpp b/src/wifi_setup.cpp index 191f793..e88123d 100644 --- a/src/wifi_setup.cpp +++ b/src/wifi_setup.cpp @@ -53,6 +53,7 @@ void mdnsReset() { } void initWiFi() { + delay(250); // Seeing if this helps prevent a brownout with bad power supplies WiFi.mode(WIFI_STA); // Explicitly set mode, ESP defaults to STA+AP