From 9dbeec3a31a57bcbf2a49b5183ddf46a73c9433c Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Thu, 20 Jul 2023 23:44:09 +0200 Subject: [PATCH 01/38] Fix: Set WiFi setScanMethod and setSortMethod also on first connect --- src/NetworkSettings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NetworkSettings.cpp b/src/NetworkSettings.cpp index d4857aeb..e43c69c9 100644 --- a/src/NetworkSettings.cpp +++ b/src/NetworkSettings.cpp @@ -21,6 +21,9 @@ void NetworkSettingsClass::init() { using std::placeholders::_1; + WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); + WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); + WiFi.onEvent(std::bind(&NetworkSettingsClass::NetworkEvent, this, _1)); setupMode(); } @@ -121,8 +124,6 @@ void NetworkSettingsClass::setupMode() dnsServer->stop(); dnsServerStatus = false; if (_networkMode == network_mode::WiFi) { - WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); - WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); WiFi.mode(WIFI_STA); } else { WiFi.mode(WIFI_MODE_NULL); From bf4dc56cb839241d6673ef2f48248cff8cf314da Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Fri, 21 Jul 2023 19:02:18 +0200 Subject: [PATCH 02/38] Fix: Reboot loop if negative display pins and type where provided Fix #1163 --- src/PinMapping.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PinMapping.cpp b/src/PinMapping.cpp index b9532d66..68395b6f 100644 --- a/src/PinMapping.cpp +++ b/src/PinMapping.cpp @@ -11,23 +11,23 @@ #define JSON_BUFFER_SIZE 6144 #ifndef DISPLAY_TYPE -#define DISPLAY_TYPE 0 +#define DISPLAY_TYPE 0U #endif #ifndef DISPLAY_DATA -#define DISPLAY_DATA 255 +#define DISPLAY_DATA 255U #endif #ifndef DISPLAY_CLK -#define DISPLAY_CLK 255 +#define DISPLAY_CLK 255U #endif #ifndef DISPLAY_CS -#define DISPLAY_CS 255 +#define DISPLAY_CS 255U #endif #ifndef DISPLAY_RESET -#define DISPLAY_RESET 255 +#define DISPLAY_RESET 255U #endif #ifndef LED0 From 972dea297b3e695f92c6d1d8d3dcfc62fa6a0185 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Sat, 22 Jul 2023 15:30:40 +0200 Subject: [PATCH 03/38] Fix: Prevent runtime errors in webapp when invalid pin_mapping.json is provided --- webapp/src/components/PinInfo.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/src/components/PinInfo.vue b/webapp/src/components/PinInfo.vue index bb140035..af7e788c 100644 --- a/webapp/src/components/PinInfo.vue +++ b/webapp/src/components/PinInfo.vue @@ -17,11 +17,11 @@ {{ capitalizeFirstLetter(category) }} {{ prop }} -