From 1ee99cd3b6bf456979cc53623b854d04ae936fda Mon Sep 17 00:00:00 2001 From: Peter Feerick <5500713+pfeerick@users.noreply.github.com> Date: Thu, 5 Nov 2026 00:08:25 +0000 Subject: [PATCH] fix(color): wait for power button release before splash power check Since #7618 the color splash wait actually runs on H7 radios, and it calls pwrCheck() via blockUntilClose(). If the power button used to turn the radio on is still held, the shutdown countdown starts (or, with both buttons held on PWR_EXTRA_SWITCH radios, the radio turns straight off). The release wait added in #7618 was limited to PWR_BUTTON_DUAL radios; apply it to all PWR_BUTTON_PRESS radios, keeping killAllEvents() for the dual-button ones only. Co-Authored-By: Claude Opus 5.5 --- radio/src/gui/colorlcd/startup_shutdown.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/colorlcd/startup_shutdown.cpp b/radio/src/gui/colorlcd/startup_shutdown.cpp index 9cc623e62bb..72bffd5c55f 100644 --- a/radio/src/gui/colorlcd/startup_shutdown.cpp +++ b/radio/src/gui/colorlcd/startup_shutdown.cpp @@ -111,14 +111,17 @@ void waitSplash() inactivityCheckInputs(); splashStartTime += SPLASH_TIMEOUT; -#if defined(PWR_BUTTON_DUAL) - // Wait for dual power buttons to be released +#if defined(PWR_BUTTON_PRESS) + // Wait for the power button(s) to be released, + // otherwise pwrCheck() starts the shutdown countdown while (pwrPressed()) { WDG_RESET(); sleep_ms(10); } +#if defined(PWR_BUTTON_DUAL) // Kill SYS and/or MDL events killAllEvents(); +#endif MainWindow::instance()->run(); #endif