Merge branch 'ShakeWake' of https://github.com/geekbozu/InfiniTime into geekbozu-ShakeWake
# Conflicts: # src/CMakeLists.txt # src/displayapp/Apps.h # src/displayapp/DisplayApp.cpp # src/displayapp/screens/settings/Settings.cpp
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();
|
||||
@@ -477,10 +477,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;
|
||||
@@ -490,7 +490,13 @@ void SystemTask::UpdateMotion() {
|
||||
|
||||
motionController.IsSensorOk(motionSensor.IsOk());
|
||||
motionController.Update(motionValues.x, motionValues.y, motionValues.z, motionValues.steps);
|
||||
if (motionController.ShouldWakeUp(isSleeping)) {
|
||||
|
||||
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||
motionController.Should_RaiseWake(isSleeping)) {
|
||||
GoToRunning();
|
||||
}
|
||||
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake) &&
|
||||
motionController.Should_ShakeWake(settingsController.GetShakeThreshold())) {
|
||||
GoToRunning();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user