Added Shake to wake
This commit is contained in:
@@ -343,18 +343,18 @@ void SystemTask::Work() {
|
||||
xTimerStart(dimTimer, 0);
|
||||
break;
|
||||
case Messages::StartFileTransfer:
|
||||
NRF_LOG_INFO("[systemtask] FS Started");
|
||||
NRF_LOG_INFO("[systemtask] FS Started");
|
||||
doNotGoToSleep = true;
|
||||
if (isSleeping && !isWakingUp)
|
||||
GoToRunning();
|
||||
//TODO add intent of fs access icon or something
|
||||
// TODO add intent of fs access icon or something
|
||||
break;
|
||||
case Messages::StopFileTransfer:
|
||||
NRF_LOG_INFO("[systemtask] FS Stopped");
|
||||
doNotGoToSleep = false;
|
||||
xTimerStart(dimTimer, 0);
|
||||
//TODO add intent of fs access icon or something
|
||||
break;
|
||||
// TODO add intent of fs access icon or something
|
||||
break;
|
||||
case Messages::OnTouchEvent:
|
||||
if (touchHandler.GetNewTouchInfo()) {
|
||||
touchHandler.UpdateLvglTouchPoint();
|
||||
@@ -457,10 +457,10 @@ void SystemTask::UpdateMotion() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isSleeping && !settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist)) {
|
||||
if (isSleeping && !(settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) ||
|
||||
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (stepCounterMustBeReset) {
|
||||
motionSensor.ResetStepCounter();
|
||||
stepCounterMustBeReset = false;
|
||||
@@ -470,7 +470,12 @@ void SystemTask::UpdateMotion() {
|
||||
|
||||
motionController.IsSensorOk(motionSensor.IsOk());
|
||||
motionController.Update(motionValues.x, motionValues.y, motionValues.z, motionValues.steps);
|
||||
if (motionController.ShouldWakeUp(isSleeping)) {
|
||||
// TODO add modes arg
|
||||
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||
motionController.Should_RaiseWake(isSleeping)) {
|
||||
GoToRunning();
|
||||
}
|
||||
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake) && motionController.Should_ShakeWake()) {
|
||||
GoToRunning();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user