fix(color): splash screen delay time is bypassed on H7 radios (#7618)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
@@ -84,11 +84,13 @@ void drawSplash()
|
||||
}
|
||||
|
||||
static tmr10ms_t splashStartTime = 0;
|
||||
static bool splashRunning = false;
|
||||
|
||||
void startSplash()
|
||||
{
|
||||
if (!UNEXPECTED_SHUTDOWN()) {
|
||||
splashStartTime = get_tmr10ms();
|
||||
splashRunning = true;
|
||||
drawSplash();
|
||||
}
|
||||
}
|
||||
@@ -105,10 +107,21 @@ void cancelSplash()
|
||||
void waitSplash()
|
||||
{
|
||||
// Handle color splash screen
|
||||
if (splashStartTime) {
|
||||
if (splashRunning) {
|
||||
inactivityCheckInputs();
|
||||
splashStartTime += SPLASH_TIMEOUT;
|
||||
|
||||
#if defined(PWR_BUTTON_DUAL)
|
||||
// Wait for dual power buttons to be released
|
||||
while (pwrPressed()) {
|
||||
WDG_RESET();
|
||||
sleep_ms(10);
|
||||
}
|
||||
// Kill SYS and/or MDL events
|
||||
killAllEvents();
|
||||
MainWindow::instance()->run();
|
||||
#endif
|
||||
|
||||
MainWindow::instance()->blockUntilClose(true, [=]() {
|
||||
if (splashStartTime < get_tmr10ms())
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user