Made calibration window enable Accel wakeups for setting and calibration even when wake mode is inactive.
This commit is contained in:
parent
92b1e83e3e
commit
f86c71b2bb
|
@ -63,13 +63,20 @@ SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app,
|
||||||
|
|
||||||
vDecay = xTaskGetTickCount();
|
vDecay = xTaskGetTickCount();
|
||||||
calibrating = false;
|
calibrating = false;
|
||||||
|
if(!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)){
|
||||||
|
EnableForCal = true;
|
||||||
|
settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake,true);
|
||||||
|
}
|
||||||
refreshTask = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
|
refreshTask = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingShakeThreshold::~SettingShakeThreshold() {
|
SettingShakeThreshold::~SettingShakeThreshold() {
|
||||||
settingsController.SetShakeThreshold(lv_arc_get_value(positionArc));
|
settingsController.SetShakeThreshold(lv_arc_get_value(positionArc));
|
||||||
|
|
||||||
|
if(EnableForCal){
|
||||||
|
settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake,false);
|
||||||
|
EnableForCal = false;
|
||||||
|
}
|
||||||
lv_task_del(refreshTask);
|
lv_task_del(refreshTask);
|
||||||
settingsController.SaveSettings();
|
settingsController.SaveSettings();
|
||||||
lv_obj_clean(lv_scr_act());
|
lv_obj_clean(lv_scr_act());
|
||||||
|
|
|
@ -26,6 +26,7 @@ namespace Pinetime {
|
||||||
Controllers::MotionController& motionController;
|
Controllers::MotionController& motionController;
|
||||||
System::SystemTask& systemTask;
|
System::SystemTask& systemTask;
|
||||||
uint8_t calibrating;
|
uint8_t calibrating;
|
||||||
|
bool EnableForCal;
|
||||||
uint32_t vDecay,vCalTime;
|
uint32_t vDecay,vCalTime;
|
||||||
lv_obj_t *positionArc, *animArc,*calButton, *calLabel;
|
lv_obj_t *positionArc, *animArc,*calButton, *calLabel;
|
||||||
lv_task_t* refreshTask;
|
lv_task_t* refreshTask;
|
||||||
|
|
Loading…
Reference in New Issue