raisewake: Change names in line with the style guide
This commit is contained in:
parent
49ad5be742
commit
e55a76f740
|
@ -29,22 +29,22 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps)
|
||||||
this->nbSteps = nbSteps;
|
this->nbSteps = nbSteps;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MotionController::Should_RaiseWake(bool isSleeping) {
|
bool MotionController::ShouldRaiseWake(bool isSleeping) {
|
||||||
if ((x + 335) <= 670 && z < 0) {
|
if ((x + 335) <= 670 && z < 0) {
|
||||||
if (not isSleeping) {
|
if (!isSleeping) {
|
||||||
if (y <= 0) {
|
if (y <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
lastYForWakeUp = 0;
|
lastYForRaiseWake = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (y >= 0) {
|
if (y >= 0) {
|
||||||
lastYForWakeUp = 0;
|
lastYForRaiseWake = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (y + 230 < lastYForWakeUp) {
|
if (y + 230 < lastYForRaiseWake) {
|
||||||
lastYForWakeUp = y;
|
lastYForRaiseWake = y;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace Pinetime {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShouldShakeWake(uint16_t thresh);
|
bool ShouldShakeWake(uint16_t thresh);
|
||||||
bool Should_RaiseWake(bool isSleeping);
|
bool ShouldRaiseWake(bool isSleeping);
|
||||||
|
|
||||||
int32_t CurrentShakeSpeed() const {
|
int32_t CurrentShakeSpeed() const {
|
||||||
return accumulatedSpeed;
|
return accumulatedSpeed;
|
||||||
|
@ -76,7 +76,7 @@ namespace Pinetime {
|
||||||
TickType_t time = 0;
|
TickType_t time = 0;
|
||||||
|
|
||||||
int16_t x = 0;
|
int16_t x = 0;
|
||||||
int16_t lastYForWakeUp = 0;
|
int16_t lastYForRaiseWake = 0;
|
||||||
int16_t lastY = 0;
|
int16_t lastY = 0;
|
||||||
int16_t y = 0;
|
int16_t y = 0;
|
||||||
int16_t lastZ = 0;
|
int16_t lastZ = 0;
|
||||||
|
|
|
@ -468,7 +468,7 @@ void SystemTask::UpdateMotion() {
|
||||||
|
|
||||||
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep) {
|
if (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep) {
|
||||||
if ((settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
if ((settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||||
motionController.Should_RaiseWake(state == SystemTaskState::Sleeping)) ||
|
motionController.ShouldRaiseWake(state == SystemTaskState::Sleeping)) ||
|
||||||
(settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake) &&
|
(settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake) &&
|
||||||
motionController.ShouldShakeWake(settingsController.GetShakeThreshold()))) {
|
motionController.ShouldShakeWake(settingsController.GetShakeThreshold()))) {
|
||||||
GoToRunning();
|
GoToRunning();
|
||||||
|
|
Loading…
Reference in a new issue