@@ -24,6 +24,19 @@ SettingShakeThreshold::SettingShakeThreshold(Controllers::Settings& settingsCont
2424 lv_label_set_align (title, LV_LABEL_ALIGN_CENTER);
2525 lv_obj_align (title, lv_scr_act (), LV_ALIGN_IN_TOP_MID, 0 , 0 );
2626
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+
2740 positionArc = lv_arc_create (lv_scr_act (), nullptr );
2841 positionArc->user_data = this ;
2942
@@ -72,6 +85,9 @@ SettingShakeThreshold::SettingShakeThreshold(Controllers::Settings& settingsCont
7285}
7386
7487SettingShakeThreshold::~SettingShakeThreshold () {
88+ if (calibrating == 255 )
89+ return ;
90+
7591 settingsController.SetShakeThreshold (lv_arc_get_value (positionArc));
7692
7793 if (EnableForCal) {
0 commit comments