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 tmr10ms_t splashStartTime = 0;
|
||||||
|
static bool splashRunning = false;
|
||||||
|
|
||||||
void startSplash()
|
void startSplash()
|
||||||
{
|
{
|
||||||
if (!UNEXPECTED_SHUTDOWN()) {
|
if (!UNEXPECTED_SHUTDOWN()) {
|
||||||
splashStartTime = get_tmr10ms();
|
splashStartTime = get_tmr10ms();
|
||||||
|
splashRunning = true;
|
||||||
drawSplash();
|
drawSplash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,10 +107,21 @@ void cancelSplash()
|
|||||||
void waitSplash()
|
void waitSplash()
|
||||||
{
|
{
|
||||||
// Handle color splash screen
|
// Handle color splash screen
|
||||||
if (splashStartTime) {
|
if (splashRunning) {
|
||||||
inactivityCheckInputs();
|
inactivityCheckInputs();
|
||||||
splashStartTime += SPLASH_TIMEOUT;
|
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, [=]() {
|
MainWindow::instance()->blockUntilClose(true, [=]() {
|
||||||
if (splashStartTime < get_tmr10ms())
|
if (splashStartTime < get_tmr10ms())
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user