From cffcbc42a8611adb7a4e06493025555a39b22541 Mon Sep 17 00:00:00 2001 From: "jb.justcode" Date: Wed, 12 Aug 2026 03:00:06 +0200 Subject: [PATCH] fix(color): can not exit Ghost module config page with no module attached (#7599) --- radio/src/gui/colorlcd/radio/radio_ghost_module_config.cpp | 6 ++++++ radio/src/gui/colorlcd/radio/radio_ghost_module_config.h | 1 + 2 files changed, 7 insertions(+) diff --git a/radio/src/gui/colorlcd/radio/radio_ghost_module_config.cpp b/radio/src/gui/colorlcd/radio/radio_ghost_module_config.cpp index 26d73d11d..0889ee0f2 100644 --- a/radio/src/gui/colorlcd/radio/radio_ghost_module_config.cpp +++ b/radio/src/gui/colorlcd/radio/radio_ghost_module_config.cpp @@ -63,6 +63,8 @@ class GhostModuleConfigWindow : public Window void checkEvents() override { + Window::checkEvents(); + for (uint8_t i = 0; i < GHST_MENU_LINES; i += 1) { menuLines[i][1]->setText(""); @@ -167,6 +169,7 @@ void RadioGhostModuleConfig::onLongPressRTN() reusableBuffer.ghostMenu.menuAction = GHST_MENU_CTRL_CLOSE; moduleState[EXTERNAL_MODULE].counter = GHST_MENU_CONTROL; sleep_ms(10); + deleteLater(); #if defined(TRIMS_EMULATE_BUTTONS) setHatsAsKeys(false); // switch trims back to normal #endif @@ -195,6 +198,9 @@ void RadioGhostModuleConfig::checkEvents() void RadioGhostModuleConfig::init() { memclear(&reusableBuffer.ghostMenu, sizeof(reusableBuffer.ghostMenu)); + strAppend((char *)&reusableBuffer.ghostMenu.line[1].menuText, + STR_WAITING_FOR_MODULE, 0); + reusableBuffer.ghostMenu.line[1].lineFlags = GHST_LINE_FLAGS_VALUE_EDIT; reusableBuffer.ghostMenu.buttonAction = GHST_BTN_NONE; reusableBuffer.ghostMenu.menuAction = GHST_MENU_CTRL_OPEN; moduleState[EXTERNAL_MODULE].counter = GHST_MENU_CONTROL; diff --git a/radio/src/gui/colorlcd/radio/radio_ghost_module_config.h b/radio/src/gui/colorlcd/radio/radio_ghost_module_config.h index 9bf183f5e..db0a297fd 100644 --- a/radio/src/gui/colorlcd/radio/radio_ghost_module_config.h +++ b/radio/src/gui/colorlcd/radio/radio_ghost_module_config.h @@ -39,5 +39,6 @@ class RadioGhostModuleConfig: public Page void checkEvents() override; void onCancel() override; void onLongPressRTN() override; + void doKeyShortcut(event_t) override {} #endif };