Skip to content

Commit 075061c

Browse files
fix: screen dimming
1 parent 9541450 commit 075061c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/displayapp/DisplayApp.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,18 +221,17 @@ void DisplayApp::Refresh() {
221221
RestoreBrightness();
222222
break;
223223
case Messages::GoToSleep:
224-
// If brightnessController.Level() is not set to Off before going to sleep then the watch locks up at some point. Dim the screen all the way off regardless of AlwaysOn status
225-
while (brightnessController.Level() != Controllers::BrightnessController::Levels::Off) {
224+
while (brightnessController.Level() != Controllers::BrightnessController::Levels::Low) {
226225
brightnessController.Lower();
227226
vTaskDelay(100);
228227
}
229228
// Don't actually turn off the display for AlwaysOn mode
230229
if (!settingsController.GetAlwaysOnDisplay()) {
230+
brightnessController.Set(Controllers::BrightnessController::Levels::Off);
231231
lcd.Sleep();
232-
// Turn the brightness up manually for AlwaysOn
233232
} else {
234233
brightnessController.Set(Controllers::BrightnessController::Levels::Lowest);
235-
}
234+
}
236235
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
237236
state = States::Idle;
238237
break;

0 commit comments

Comments
 (0)