Made calibration window enable Accel wakeups for setting and calibration even when wake mode is inactive.

This commit is contained in:
Tim Keller 2021-11-08 02:00:35 +00:00
parent 92b1e83e3e
commit f86c71b2bb
2 changed files with 9 additions and 1 deletions

View File

@ -63,13 +63,20 @@ SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app,
vDecay = xTaskGetTickCount();
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);
}
SettingShakeThreshold::~SettingShakeThreshold() {
settingsController.SetShakeThreshold(lv_arc_get_value(positionArc));
if(EnableForCal){
settingsController.setWakeUpMode(Pinetime::Controllers::Settings::WakeUpMode::Shake,false);
EnableForCal = false;
}
lv_task_del(refreshTask);
settingsController.SaveSettings();
lv_obj_clean(lv_scr_act());

View File

@ -26,6 +26,7 @@ namespace Pinetime {
Controllers::MotionController& motionController;
System::SystemTask& systemTask;
uint8_t calibrating;
bool EnableForCal;
uint32_t vDecay,vCalTime;
lv_obj_t *positionArc, *animArc,*calButton, *calLabel;
lv_task_t* refreshTask;