Skip to content

Commit

Permalink
Updated info page to show current wake mode instead of just gradual wake
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberneel committed Dec 7, 2024
1 parent fe9f176 commit 01b3255
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/displayapp/screens/Sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,12 @@ void Sleep::DrawInfoScreen() {

// Gradual Wake info
label_gradual_wake = lv_label_create(lv_scr_act(), nullptr);
if (infiniSleepController.GetInfiniSleepSettings().graddualWake && infiniSleepController.gradualWakeStep >= 0) {
lv_label_set_text_fmt(label_gradual_wake, "Gradual Wake: ON");
if (infiniSleepController.infiniSleepSettings.graddualWake) {
lv_label_set_text_static(label_gradual_wake, "Wake Mode: Gradual");
} else if (infiniSleepController.infiniSleepSettings.naturalWake) {
lv_label_set_text_static(label_gradual_wake, "Wake Mode: Natural");
} else {
lv_label_set_text_static(label_gradual_wake, "Gradual Wake: OFF");
lv_label_set_text_static(label_gradual_wake, "Wake Mode: Off");
}
lv_obj_align(label_gradual_wake, lv_scr_act(), LV_ALIGN_CENTER, 0, 40);
lv_obj_set_style_local_text_color(label_gradual_wake,
Expand Down

0 comments on commit 01b3255

Please sign in to comment.