@@ -24,6 +24,19 @@ SettingShakeThreshold::SettingShakeThreshold(Controllers::Settings& settingsCont
24
24
lv_label_set_align (title, LV_LABEL_ALIGN_CENTER);
25
25
lv_obj_align (title, lv_scr_act (), LV_ALIGN_IN_TOP_MID, 0 , 0 );
26
26
27
+ if (settingsController.GetNotificationStatus () == Controllers::Settings::Notification::Sleep) {
28
+ lv_obj_t * explanation = lv_label_create (lv_scr_act (), nullptr );
29
+ lv_label_set_long_mode (explanation, LV_LABEL_LONG_BREAK);
30
+ lv_label_set_align (explanation, LV_LABEL_ALIGN_AUTO);
31
+ lv_obj_set_width (explanation, LV_HOR_RES_MAX);
32
+ lv_label_set_text_static (
33
+ explanation,
34
+ " \n Shake detector is disabled in sleep mode, and will neither wake up the watch nor calibrate.\n Disable sleep mode to calibrate." );
35
+ calibrating = 255 ;
36
+ lv_obj_align (explanation, title, LV_ALIGN_OUT_BOTTOM_MID, 0 , 0 );
37
+ return ;
38
+ }
39
+
27
40
positionArc = lv_arc_create (lv_scr_act (), nullptr );
28
41
positionArc->user_data = this ;
29
42
@@ -72,6 +85,9 @@ SettingShakeThreshold::SettingShakeThreshold(Controllers::Settings& settingsCont
72
85
}
73
86
74
87
SettingShakeThreshold::~SettingShakeThreshold () {
88
+ if (calibrating == 255 )
89
+ return ;
90
+
75
91
settingsController.SetShakeThreshold (lv_arc_get_value (positionArc));
76
92
77
93
if (EnableForCal) {
0 commit comments