From c2e8f0fdc71d6e5991eed2c8d46e9b720cbcfbba Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Tue, 29 Sep 2026 00:27:24 +0200 Subject: [PATCH] Fix menu exit after hot config switching --- App/app/menu.c | 17 ++++++++++++++++- CMakePresets.json | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/App/app/menu.c b/App/app/menu.c index 217efd0f..2b692e55 100644 --- a/App/app/menu.c +++ b/App/app/menu.c @@ -63,6 +63,9 @@ uint8_t gScanMixEditorCursor; uint32_t gScanMixEditorMask; #ifdef ENABLE_FEAT_F4HWN_MULTIBOOT_HOT_CFG +// Keep the confirmation key routed to the menu until its release is consumed. +static bool gConfigBankExitPending; + static void MENU_ApplyConfigBank(uint8_t bank) { SCANNER_Stop(); @@ -110,7 +113,7 @@ static void MENU_ApplyConfigBank(uint8_t bank) gVfoConfigureMode = VFO_CONFIGURE_RELOAD; gFlagResetVfos = true; gFlagReconfigureVfos = false; - gRequestDisplayScreen = DISPLAY_MAIN; + gConfigBankExitPending = true; gUpdateStatus = true; gUpdateDisplay = true; } @@ -1769,6 +1772,18 @@ Skip: static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld) { +#ifdef ENABLE_FEAT_F4HWN_MULTIBOOT_HOT_CFG + if (gConfigBankExitPending) + { + if (!bKeyPressed) + { + gConfigBankExitPending = false; + gRequestDisplayScreen = DISPLAY_MAIN; + } + return; + } +#endif + if (gScanMixEditorActive) { if (!bKeyPressed || bKeyHeld) diff --git a/CMakePresets.json b/CMakePresets.json index d61d4a7d..dbd8cdbd 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -101,7 +101,7 @@ "ENABLE_UART_RW_BK_REGS": false, "ENABLE_SWD": false, "VERSION_STRING_1": "v0.22", - "VERSION_STRING_2": "v6.0.0" + "VERSION_STRING_2": "v6.1.0" } }, {