From 1bb1260ea0b844e68476cc8a2151321ac8107532 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sun, 26 Jan 2025 15:52:57 +0100 Subject: [PATCH] Update to ESP-IDF v5.4 and fix warnings (#193) - Update to ESP-IDF v5.4 - Fixed a lot of new and existing warnings - Fix issue with incorrect `EventFlag` usage in Dispatcher --- .github/actions/build-firmware/action.yml | 2 +- .github/actions/build-sdk/action.yml | 2 +- App/idf_component.yml | 2 +- .../Source/hal/YellowDisplay.cpp | 1 + Boards/LilygoTdeck/Source/InitHardware.cpp | 1 + .../LilygoTdeck/Source/hal/TdeckDisplay.cpp | 11 +- Boards/M5stackCore2/Source/InitBoot.cpp | 4 +- Boards/M5stackCoreS3/Source/InitBoot.cpp | 5 +- .../Source/hal/CoreS3Display.cpp | 2 + Boards/UnPhone/Source/InitHardware.cpp | 1 + Boards/UnPhone/Source/hx8357/disp_spi.c | 2 +- CONTRIBUTING.md | 2 +- Libraries/QRCode/src/qrcode.c | 12 +- Tactility/Source/app/AppCompatC.h | 109 ------------------ Tactility/Source/app/ElfApp.cpp | 27 ++--- Tactility/Source/app/ElfApp.h | 9 +- Tactility/Source/app/power/Power.cpp | 1 - Tactility/Source/app/textviewer/TextViewer.h | 2 +- Tactility/Source/service/gui/Gui.cpp | 7 +- Tactility/Source/service/loader/Loader.cpp | 11 +- TactilityC/Source/tt_app_manifest.cpp | 1 - TactilityCore/Source/Dispatcher.cpp | 23 ++-- TactilityCore/Source/Dispatcher.h | 3 +- .../Source/service/wifi/WifiEsp.cpp | 2 + 24 files changed, 67 insertions(+), 175 deletions(-) delete mode 100644 Tactility/Source/app/AppCompatC.h diff --git a/.github/actions/build-firmware/action.yml b/.github/actions/build-firmware/action.yml index e57d87ae..4c44b347 100644 --- a/.github/actions/build-firmware/action.yml +++ b/.github/actions/build-firmware/action.yml @@ -20,7 +20,7 @@ runs: - name: 'Build' uses: espressif/esp-idf-ci-action@main with: - esp_idf_version: v5.3.2 + esp_idf_version: v5.4 target: ${{ inputs.arch }} path: './' - name: 'Release' diff --git a/.github/actions/build-sdk/action.yml b/.github/actions/build-sdk/action.yml index ed792fbd..4348680a 100644 --- a/.github/actions/build-sdk/action.yml +++ b/.github/actions/build-sdk/action.yml @@ -20,7 +20,7 @@ runs: - name: 'Build' uses: espressif/esp-idf-ci-action@main with: - esp_idf_version: v5.3.2 + esp_idf_version: v5.4 target: ${{ inputs.arch }} path: './' - name: 'Release' diff --git a/App/idf_component.yml b/App/idf_component.yml index 989ca606..e59a59fc 100644 --- a/App/idf_component.yml +++ b/App/idf_component.yml @@ -11,4 +11,4 @@ dependencies: version: "1.5.0" rules: - if: "target == esp32s3" - idf: '5.3.2' + idf: '5.4' diff --git a/Boards/CYD-2432S024C/Source/hal/YellowDisplay.cpp b/Boards/CYD-2432S024C/Source/hal/YellowDisplay.cpp index 035b1b7c..ff07af95 100644 --- a/Boards/CYD-2432S024C/Source/hal/YellowDisplay.cpp +++ b/Boards/CYD-2432S024C/Source/hal/YellowDisplay.cpp @@ -44,6 +44,7 @@ static bool setBacklight(uint8_t duty) { .timer_sel = TWODOTFOUR_LCD_BACKLIGHT_LEDC_TIMER, .duty = duty, .hpoint = 0, + .sleep_mode = LEDC_SLEEP_MODE_NO_ALIVE_NO_PD, .flags = { .output_invert = false } diff --git a/Boards/LilygoTdeck/Source/InitHardware.cpp b/Boards/LilygoTdeck/Source/InitHardware.cpp index 2725bed6..4e78bbd3 100644 --- a/Boards/LilygoTdeck/Source/InitHardware.cpp +++ b/Boards/LilygoTdeck/Source/InitHardware.cpp @@ -31,6 +31,7 @@ static bool init_spi() { .data5_io_num = 0, .data6_io_num = 0, .data7_io_num = 0, + .data_io_default_level = false, .max_transfer_sz = TDECK_SPI_TRANSFER_SIZE_LIMIT, .flags = 0, .isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO, diff --git a/Boards/LilygoTdeck/Source/hal/TdeckDisplay.cpp b/Boards/LilygoTdeck/Source/hal/TdeckDisplay.cpp index 16730b01..654c4e57 100644 --- a/Boards/LilygoTdeck/Source/hal/TdeckDisplay.cpp +++ b/Boards/LilygoTdeck/Source/hal/TdeckDisplay.cpp @@ -45,6 +45,7 @@ static bool setBacklight(uint8_t duty) { .timer_sel = TDECK_LCD_BACKLIGHT_LEDC_TIMER, .duty = duty, .hpoint = 0, + .sleep_mode = LEDC_SLEEP_MODE_NO_ALIVE_NO_PD, .flags = { .output_invert = 0 } @@ -68,6 +69,8 @@ bool TdeckDisplay::start() { .user_ctx = nullptr, .lcd_cmd_bits = 8, .lcd_param_bits = 8, + .cs_ena_pretrans = 0, + .cs_ena_posttrans = 0, .flags = { .dc_high_on_cmd = 0, .dc_low_on_data = 0, @@ -134,6 +137,7 @@ bool TdeckDisplay::start() { const lvgl_port_display_cfg_t disp_cfg = { .io_handle = ioHandle, .panel_handle = panelHandle, + .control_handle = nullptr, .buffer_size = TDECK_LCD_HORIZONTAL_RESOLUTION * TDECK_LCD_DRAW_BUFFER_HEIGHT * (TDECK_LCD_BITS_PER_PIXEL / 8), .double_buffer = true, // Disable to free up SPIRAM .trans_size = 0, @@ -145,12 +149,15 @@ bool TdeckDisplay::start() { .mirror_x = true, .mirror_y = false, }, + .color_format = LV_COLOR_FORMAT_RGB565, .flags = { .buff_dma = false, .buff_spiram = true, .sw_rotate = false, - .swap_bytes = false - }, + .swap_bytes = false, + .full_refresh = false, + .direct_mode = false + } }; displayHandle = lvgl_port_add_disp(&disp_cfg); diff --git a/Boards/M5stackCore2/Source/InitBoot.cpp b/Boards/M5stackCore2/Source/InitBoot.cpp index c33e6953..ff2173ef 100644 --- a/Boards/M5stackCore2/Source/InitBoot.cpp +++ b/Boards/M5stackCore2/Source/InitBoot.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "Log.h" #include "hal/Core2DisplayConstants.h" #include "axp192/axp192.h" @@ -37,7 +37,7 @@ static bool initSpi2() { .data7_io_num = GPIO_NUM_NC, .max_transfer_sz = CORE2_LCD_DRAW_BUFFER_SIZE, .flags = 0, - .isr_cpu_id = INTR_CPU_ID_AUTO, + .isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO, .intr_flags = 0 }; diff --git a/Boards/M5stackCoreS3/Source/InitBoot.cpp b/Boards/M5stackCoreS3/Source/InitBoot.cpp index 4d5be8a0..55d1f2a1 100644 --- a/Boards/M5stackCoreS3/Source/InitBoot.cpp +++ b/Boards/M5stackCoreS3/Source/InitBoot.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "Log.h" #include "hal/CoreS3DisplayConstants.h" #include "kernel/Kernel.h" @@ -28,9 +28,10 @@ static bool initSpi3() { .data5_io_num = GPIO_NUM_NC, .data6_io_num = GPIO_NUM_NC, .data7_io_num = GPIO_NUM_NC, + .data_io_default_level = false, .max_transfer_sz = CORES3_LCD_DRAW_BUFFER_SIZE, .flags = 0, - .isr_cpu_id = INTR_CPU_ID_AUTO, + .isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO, .intr_flags = 0 }; diff --git a/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp b/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp index abce2a86..78fc6dc0 100644 --- a/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp +++ b/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp @@ -29,6 +29,8 @@ bool CoreS3Display::start() { .user_ctx = nullptr, .lcd_cmd_bits = 8, .lcd_param_bits = 8, + .cs_ena_pretrans = 0, + .cs_ena_posttrans = 0, .flags = { .dc_high_on_cmd = 0, .dc_low_on_data = 0, diff --git a/Boards/UnPhone/Source/InitHardware.cpp b/Boards/UnPhone/Source/InitHardware.cpp index 656c0459..91bef156 100644 --- a/Boards/UnPhone/Source/InitHardware.cpp +++ b/Boards/UnPhone/Source/InitHardware.cpp @@ -27,6 +27,7 @@ static bool initSpi() { .data5_io_num = 0, .data6_io_num = 0, .data7_io_num = 0, + .data_io_default_level = false, .max_transfer_sz = UNPHONE_SPI_TRANSFER_SIZE_LIMIT, .flags = 0, .isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO, diff --git a/Boards/UnPhone/Source/hx8357/disp_spi.c b/Boards/UnPhone/Source/hx8357/disp_spi.c index 36c11239..186244ce 100644 --- a/Boards/UnPhone/Source/hx8357/disp_spi.c +++ b/Boards/UnPhone/Source/hx8357/disp_spi.c @@ -87,7 +87,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static void IRAM_ATTR spi_ready (spi_transaction_t *trans); +static void spi_ready(spi_transaction_t*trans); /********************** * STATIC VARIABLES diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f9791f07..d38a93a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ If you implemented a board yourself, I'm willing to refer to your implementation ### Anything that doesn't fall in the above categories? -Please [contact me](https://tactility.one/#/support)a me first! +Please [contact me](https://tactility.one/#/support) me first! ## Pull Requests diff --git a/Libraries/QRCode/src/qrcode.c b/Libraries/QRCode/src/qrcode.c index c182b355..fe458ee0 100755 --- a/Libraries/QRCode/src/qrcode.c +++ b/Libraries/QRCode/src/qrcode.c @@ -848,20 +848,10 @@ int8_t qrcode_initText(QRCode *qrcode, uint8_t *modules, uint8_t version, uint8_ } bool qrcode_getModule(QRCode *qrcode, uint8_t x, uint8_t y) { - if (x < 0 || x >= qrcode->size || y < 0 || y >= qrcode->size) { + if (x >= qrcode->size || y >= qrcode->size) { return false; } uint32_t offset = y * qrcode->size + x; return (qrcode->modules[offset >> 3] & (1 << (7 - (offset & 0x07)))) != 0; } - -/* -uint8_t qrcode_getHexLength(QRCode *qrcode) { - return ((qrcode->size * qrcode->size) + 7) / 4; -} - -void qrcode_getHex(QRCode *qrcode, char *result) { - -} -*/ diff --git a/Tactility/Source/app/AppCompatC.h b/Tactility/Source/app/AppCompatC.h deleted file mode 100644 index f6afc38e..00000000 --- a/Tactility/Source/app/AppCompatC.h +++ /dev/null @@ -1,109 +0,0 @@ -#pragma once - -#include "./App.h" -#include "./AppManifest.h" - -namespace tt::app { - -typedef void* (*CreateData)(); -typedef void (*DestroyData)(void* data); -typedef void (*OnStart)(AppContext& app, void* _Nullable data); -typedef void (*OnStop)(AppContext& app, void* _Nullable data); -typedef void (*OnShow)(AppContext& app, void* _Nullable data, lv_obj_t* parent); -typedef void (*OnHide)(AppContext& app, void* _Nullable data); -typedef void (*OnResult)(AppContext& app, void* _Nullable data, Result result, std::unique_ptr resultData); - -class AppCompatC : public App { - -private: - - CreateData _Nullable createData; - DestroyData _Nullable destroyData; - OnStart _Nullable onStartCallback; - OnStop _Nullable onStopCallback; - OnShow _Nullable onShowCallback; - OnHide _Nullable onHideCallback; - OnResult _Nullable onResultCallback; - - void* data = nullptr; - -public: - - AppCompatC( - CreateData _Nullable createData, - DestroyData _Nullable destroyData, - OnStart _Nullable onStart, - OnStop _Nullable onStop, - OnShow _Nullable onShow, - OnHide _Nullable onHide, - OnResult _Nullable onResult - ) : createData(createData), - destroyData(destroyData), - onStartCallback(onStart), - onStopCallback(onStop), - onShowCallback(onShow), - onHideCallback(onHide), - onResultCallback(onResult) - {} - - void onStart(AppContext& appContext) override { - if (createData != nullptr) { - data = createData(); - } - - if (onStartCallback != nullptr) { - onStartCallback(appContext, data); - } - } - - void onStop(AppContext& appContext) override { - if (onStopCallback != nullptr) { - onStopCallback(appContext, data); - } - - if (destroyData != nullptr && data != nullptr) { - destroyData(data); - } - } - - void onShow(AppContext& appContext, lv_obj_t* parent) override { - if (onShowCallback != nullptr) { - onShowCallback(appContext, data, parent); - } - } - - void onHide(AppContext& appContext) override { - if (onHideCallback != nullptr) { - onHideCallback(appContext, data); - } - } - - void onResult(AppContext& appContext, Result result, std::unique_ptr _Nullable resultData) override { - if (onResultCallback != nullptr) { - onResultCallback(appContext, data, result, std::move(resultData)); - } - } -}; - -template -App* createC( - CreateData _Nullable createData, - DestroyData _Nullable destroyData, - OnStart _Nullable onStartCallback, - OnStop _Nullable onStopCallback, - OnShow _Nullable onShowCallback, - OnHide _Nullable onHideCallback, - OnResult _Nullable onResultCallback -) { - return new AppCompatC( - createData, - destroyData, - onStartCallback, - onStopCallback, - onShowCallback, - onHideCallback, - onResultCallback - ); -} - -} diff --git a/Tactility/Source/app/ElfApp.cpp b/Tactility/Source/app/ElfApp.cpp index 2e4a7e88..3b3cddc8 100644 --- a/Tactility/Source/app/ElfApp.cpp +++ b/Tactility/Source/app/ElfApp.cpp @@ -9,6 +9,7 @@ #include "service/loader/Loader.h" #include +#include namespace tt::app { @@ -19,13 +20,13 @@ struct ElfManifest { std::string name; /** Optional icon. */ std::string icon; - CreateData _Nullable createData; - DestroyData _Nullable destroyData; - OnStart _Nullable onStart; - OnStop _Nullable onStop; - OnShow _Nullable onShow; - OnHide _Nullable onHide; - OnResult _Nullable onResult; + CreateData _Nullable createData = nullptr; + DestroyData _Nullable destroyData = nullptr; + OnStart _Nullable onStart = nullptr; + OnStop _Nullable onStop = nullptr; + OnShow _Nullable onShow = nullptr; + OnHide _Nullable onHide = nullptr; + OnResult _Nullable onResult = nullptr; }; static size_t elfManifestSetCount = 0; @@ -88,7 +89,7 @@ private: public: - explicit ElfApp(const std::string& filePath) : filePath(filePath) {} + explicit ElfApp(std::string filePath) : filePath(std::move(filePath)) {} void onStart(AppContext& appContext) override { auto initial_count = elfManifestSetCount; @@ -101,7 +102,7 @@ public: } if (manifest->onStart != nullptr) { - manifest->onStart(appContext, data); + manifest->onStart(&appContext, data); } } } else { @@ -113,7 +114,7 @@ public: TT_LOG_I(TAG, "Cleaning up app"); if (manifest != nullptr) { if (manifest->onStop != nullptr) { - manifest->onStop(appContext, data); + manifest->onStop(&appContext, data); } if (manifest->destroyData != nullptr && data != nullptr) { @@ -127,19 +128,19 @@ public: void onShow(AppContext& appContext, lv_obj_t* parent) override { if (manifest != nullptr && manifest->onShow != nullptr) { - manifest->onShow(appContext, data, parent); + manifest->onShow(&appContext, data, parent); } } void onHide(AppContext& appContext) override { if (manifest != nullptr && manifest->onHide != nullptr) { - manifest->onHide(appContext, data); + manifest->onHide(&appContext, data); } } void onResult(AppContext& appContext, Result result, std::unique_ptr resultBundle) override { if (manifest != nullptr && manifest->onResult != nullptr) { - manifest->onResult(appContext, data, result, std::move(resultBundle)); + manifest->onResult(&appContext, data, result, resultBundle.get()); } } }; diff --git a/Tactility/Source/app/ElfApp.h b/Tactility/Source/app/ElfApp.h index 566117c1..496a21f6 100644 --- a/Tactility/Source/app/ElfApp.h +++ b/Tactility/Source/app/ElfApp.h @@ -1,12 +1,19 @@ #pragma once -#include "AppCompatC.h" #include "AppManifest.h" #ifdef ESP_PLATFORM namespace tt::app { +typedef void* (*CreateData)(); +typedef void (*DestroyData)(void* data); +typedef void (*OnStart)(void* appContext, void* _Nullable data); +typedef void (*OnStop)(void* appContext, void* _Nullable data); +typedef void (*OnShow)(void* appContext, void* _Nullable data, lv_obj_t* parent); +typedef void (*OnHide)(void* appContext, void* _Nullable data); +typedef void (*OnResult)(void* appContext, void* _Nullable data, Result result, Bundle* resultData); + void setElfAppManifest( const char* name, const char* _Nullable icon, diff --git a/Tactility/Source/app/power/Power.cpp b/Tactility/Source/app/power/Power.cpp index ae383b4d..0e69e76f 100644 --- a/Tactility/Source/app/power/Power.cpp +++ b/Tactility/Source/app/power/Power.cpp @@ -13,7 +13,6 @@ namespace tt::app::power { #define TAG "power" extern const AppManifest manifest; -static void onTimer(TT_UNUSED std::shared_ptr context); class PowerApp; diff --git a/Tactility/Source/app/textviewer/TextViewer.h b/Tactility/Source/app/textviewer/TextViewer.h index 3f9fdd43..0f7a72ed 100644 --- a/Tactility/Source/app/textviewer/TextViewer.h +++ b/Tactility/Source/app/textviewer/TextViewer.h @@ -2,6 +2,6 @@ namespace tt::app::textviewer { -void start(const std::string&file); +void start(const std::string& file); } diff --git a/Tactility/Source/service/gui/Gui.cpp b/Tactility/Source/service/gui/Gui.cpp index 49938ee8..3a3999d9 100644 --- a/Tactility/Source/service/gui/Gui.cpp +++ b/Tactility/Source/service/gui/Gui.cpp @@ -120,11 +120,8 @@ static int32_t guiMain(TT_UNUSED void* p) { Gui* local_gui = gui; while (true) { - uint32_t flags = Thread::awaitFlags( - GUI_THREAD_FLAG_ALL, - EventFlag::WaitAny, - portMAX_DELAY - ); + uint32_t flags = Thread::awaitFlags(GUI_THREAD_FLAG_ALL, EventFlag::WaitAny, portMAX_DELAY); + // Process and dispatch draw call if (flags & GUI_THREAD_FLAG_DRAW) { Thread::clearFlags(GUI_THREAD_FLAG_DRAW); diff --git a/Tactility/Source/service/loader/Loader.cpp b/Tactility/Source/service/loader/Loader.cpp index 527014c0..e6d3be08 100644 --- a/Tactility/Source/service/loader/Loader.cpp +++ b/Tactility/Source/service/loader/Loader.cpp @@ -64,13 +64,10 @@ void stopApp() { std::shared_ptr _Nullable getCurrentAppContext() { assert(loader_singleton); - if (loader_singleton->mutex.lock(10 / portTICK_PERIOD_MS)) { - auto app = loader_singleton->appStack.top(); - loader_singleton->mutex.unlock(); - return std::move(app); - } else { - return nullptr; - } + loader_singleton->mutex.lock(); + auto app = loader_singleton->appStack.top(); + loader_singleton->mutex.unlock(); + return app; } std::shared_ptr _Nullable getCurrentApp() { diff --git a/TactilityC/Source/tt_app_manifest.cpp b/TactilityC/Source/tt_app_manifest.cpp index 0be25b17..e3f54a0b 100644 --- a/TactilityC/Source/tt_app_manifest.cpp +++ b/TactilityC/Source/tt_app_manifest.cpp @@ -2,7 +2,6 @@ #include #include -#include #define TAG "tt_app" diff --git a/TactilityCore/Source/Dispatcher.cpp b/TactilityCore/Source/Dispatcher.cpp index 9b555d1d..32328419 100644 --- a/TactilityCore/Source/Dispatcher.cpp +++ b/TactilityCore/Source/Dispatcher.cpp @@ -6,7 +6,7 @@ namespace tt { #define TAG "dispatcher" #define BACKPRESSURE_WARNING_COUNT ((EventBits_t)100) -#define WAIT_FLAG ((EventBits_t)1) +#define WAIT_FLAG ((EventBits_t)1U) Dispatcher::~Dispatcher() { // Wait for Mutex usage @@ -31,38 +31,33 @@ void Dispatcher::dispatch(Function function, std::shared_ptr context) { } uint32_t Dispatcher::consume(TickType_t timeout) { - // Wait for signal and clear - TickType_t start_ticks = kernel::getTicks(); - if (eventFlag.wait(WAIT_FLAG, EventFlag::WaitAny, timeout)) { - eventFlag.clear(WAIT_FLAG); - } else { + // Wait for signal + uint32_t result = eventFlag.wait(WAIT_FLAG, EventFlag::WaitAny, timeout); + if (result & EventFlag::Error) { return 0; } - TickType_t ticks_remaining = TT_MAX(timeout - (kernel::getTicks() - start_ticks), 0); - - TT_LOG_I(TAG, "Dispatcher continuing (%d ticks)", (int)ticks_remaining); + eventFlag.clear(WAIT_FLAG); // Mutate bool processing = true; uint32_t consumed = 0; do { - if (mutex.lock(ticks_remaining / portTICK_PERIOD_MS)) { + if (mutex.lock(10)) { if (!queue.empty()) { auto item = queue.front(); queue.pop(); consumed++; processing = !queue.empty(); // Don't keep lock as callback might be slow - tt_check(mutex.unlock()); + mutex.unlock(); item->function(item->context); } else { processing = false; - tt_check(mutex.unlock()); + mutex.unlock(); } - } else { - TT_LOG_E(TAG, LOG_MESSAGE_MUTEX_LOCK_FAILED); + TT_LOG_W(TAG, LOG_MESSAGE_MUTEX_LOCK_FAILED); } } while (processing); diff --git a/TactilityCore/Source/Dispatcher.h b/TactilityCore/Source/Dispatcher.h index 0ee31713..2645e9ea 100644 --- a/TactilityCore/Source/Dispatcher.h +++ b/TactilityCore/Source/Dispatcher.h @@ -54,7 +54,8 @@ public: void dispatch(Function function, std::shared_ptr context); /** - * Consume a dispatched function (if any) + * Consume 1 or more dispatched function (if any) until the queue is empty. + * @warning The timeout is only the wait time before consuming the message! It is not a limit to the total execution time when calling this method. * @param[in] timeout the ticks to wait for a message * @return the amount of messages that were consumed */ diff --git a/TactilityHeadless/Source/service/wifi/WifiEsp.cpp b/TactilityHeadless/Source/service/wifi/WifiEsp.cpp index 3b5615d2..c0294b03 100644 --- a/TactilityHeadless/Source/service/wifi/WifiEsp.cpp +++ b/TactilityHeadless/Source/service/wifi/WifiEsp.cpp @@ -738,6 +738,7 @@ static void dispatchConnect(std::shared_ptr context) { .threshold = { .rssi = 0, .authmode = WIFI_AUTH_OPEN, + .rssi_5g_adjustment = 0 }, .pmf_cfg = { .capable = false, @@ -854,6 +855,7 @@ static void dispatchDisconnectButKeepActive(std::shared_ptr context) { .threshold = { .rssi = 0, .authmode = WIFI_AUTH_OPEN, + .rssi_5g_adjustment = 0 }, .pmf_cfg = { .capable = false,