Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: InfiniTimeOrg/InfiniTime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dfa3c8e82ce4290efe5e1f67ea3d531d0951a619
Choose a base ref
..
head repository: InfiniTimeOrg/InfiniTime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1353e945158a7fc0ea131714228ecfc7cbf2e786
Choose a head ref
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/displayapp/DisplayApp.cpp
16 changes: 14 additions & 2 deletions src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
@@ -293,15 +293,27 @@ void DisplayApp::Refresh() {
brightnessController.Lower();
vTaskDelay(100);
}
// Don't actually turn off the display for AlwaysOn mode
// Turn brightness down (or set to AlwaysOn mode)
if (settingsController.GetAlwaysOnDisplay()) {
brightnessController.Set(Controllers::BrightnessController::Levels::AlwaysOn);
} else {
brightnessController.Set(Controllers::BrightnessController::Levels::Off);
}
// Since the active screen is not really an app, go back to Clock.
if (currentApp == Apps::Launcher || currentApp == Apps::Notifications || currentApp == Apps::QuickSettings ||
currentApp == Apps::Settings) {
LoadScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
// Wait for the clock app to load before moving on.
while (!lv_task_handler()) {
};
}
// Turn LCD display off (or set to low power for AlwaysOn mode)
if (settingsController.GetAlwaysOnDisplay()) {
lcd.LowPowerOn();
// Record idle entry time
alwaysOnTickCount = 0;
alwaysOnStartTime = xTaskGetTickCount();
} else {
brightnessController.Set(Controllers::BrightnessController::Levels::Off);
lcd.Sleep();
}
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);