Skip to content

Commit

Permalink
Removed suto display refresh on alarm screen, allows for holding down…
Browse files Browse the repository at this point in the history
… on widget without 2 second stutter.

Formatted DisplayApp.cpp
  • Loading branch information
cyberneel committed Dec 7, 2024
1 parent 01b3255 commit aff5c7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ void DisplayApp::Refresh() {
// LoadNewScreen(Apps::Sleep, DisplayApp::FullRefreshDirections::None);
}
// motorController.RunForDuration(infiniSleepController.gradualWakeVibrationDurations[-1 + infiniSleepController.gradualWakeStep]);

if (infiniSleepController.isSnoozing == false) {
motorController.GradualWakeBuzz();
NRF_LOG_INFO("Gradual wake triggered");
Expand Down
5 changes: 5 additions & 0 deletions src/displayapp/screens/Sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ void Sleep::Refresh() {
}

void Sleep::UpdateDisplay() {
if (lastDisplayState == displayState && displayState == SleepDisplayState::Alarm) {
return;
}

// Clear the screen
lv_obj_clean(lv_scr_act());
if (infiniSleepController.IsAlerting()) {
Expand Down Expand Up @@ -528,6 +532,7 @@ void Sleep::OnButtonEvent(lv_obj_t* obj, lv_event_t event) {

OnValueChanged();
infiniSleepController.ScheduleWakeAlarm();
SetSwitchState(LV_ANIM_OFF);
return;
}
}
Expand Down

0 comments on commit aff5c7e

Please sign in to comment.