Merge pull request #1469 from gagarinlg/dialogbl

force backlight on when displaying full screen dialogs
This commit is contained in:
Raphael Coeffic
2022-01-21 07:26:36 +01:00
committed by GitHub
2 changed files with 15 additions and 2 deletions
+14 -2
View File
@@ -158,7 +158,13 @@ void FullScreenDialog::runForever()
{ {
running = true; running = true;
MainWindow* mainWin = MainWindow::instance();
#if defined(HARDWARE_TOUCH)
mainWin->setTouchEnabled(true);
#endif
while (running) { while (running) {
resetBacklightTimeout();
auto check = pwrCheck(); auto check = pwrCheck();
if (check == e_power_off) { if (check == e_power_off) {
boardOff(); boardOff();
@@ -176,7 +182,7 @@ void FullScreenDialog::runForever()
WDG_RESET(); WDG_RESET();
RTOS_WAIT_MS(1); RTOS_WAIT_MS(1);
MainWindow::instance()->run(false); mainWin->run(false);
} }
deleteLater(); deleteLater();
@@ -186,12 +192,18 @@ void FullScreenDialog::runForeverNoPwrCheck()
{ {
running = true; running = true;
MainWindow* mainWin = MainWindow::instance();
#if defined(HARDWARE_TOUCH)
mainWin->setTouchEnabled(true);
#endif
while (running) { while (running) {
resetBacklightTimeout();
checkBacklight(); checkBacklight();
WDG_RESET(); WDG_RESET();
RTOS_WAIT_MS(1); RTOS_WAIT_MS(1);
MainWindow::instance()->run(false); mainWin->run(false);
} }
deleteLater(); deleteLater();
+1
View File
@@ -560,4 +560,5 @@ void RadioSetupPage::updateBacklightControls()
backlightOffBright->enable(false); backlightOffBright->enable(false);
break; break;
} }
resetBacklightTimeout();
} }