Skip to content

Commit

Permalink
fix: screen not updaing while dim
Browse files Browse the repository at this point in the history
  • Loading branch information
KaffeinatedKat committed Oct 3, 2023
1 parent 075061c commit 0358852
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ void DisplayApp::Refresh() {
TickType_t queueTimeout;
switch (state) {
case States::Idle:
queueTimeout = portMAX_DELAY;
if (settingsController.GetAlwaysOnDisplay()) {
queueTimeout = lv_task_handler();
} else {
queueTimeout = portMAX_DELAY;
}
break;
case States::Running:
if (!currentScreen->IsRunning()) {
Expand Down
7 changes: 6 additions & 1 deletion src/systemtask/SystemTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ void SystemTask::Work() {
// if it's in sleep mode. Avoid bricked device by disabling sleep mode on these versions.
spiNorFlash.Sleep();
}
spi.Sleep();

// If the spi goes to sleep, AlwaysOn will not update the screen while dim, and the screen colors invert
// upon wakeup
if (!settingsController.GetAlwaysOnDisplay()) {
spi.Sleep();
}

// Double Tap needs the touch screen to be in normal mode
if (!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) {
Expand Down

0 comments on commit 0358852

Please sign in to comment.