From e55a76f740561378479eda5ff8c32e09db9f1693 Mon Sep 17 00:00:00 2001 From: Finlay Davidson Date: Sun, 5 Mar 2023 15:34:03 +0100 Subject: raisewake: Change names in line with the style guide --- src/components/motion/MotionController.cpp | 12 ++++++------ src/components/motion/MotionController.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/components') diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp index 5087504c..9d16e00d 100644 --- a/src/components/motion/MotionController.cpp +++ b/src/components/motion/MotionController.cpp @@ -29,22 +29,22 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps) this->nbSteps = nbSteps; } -bool MotionController::Should_RaiseWake(bool isSleeping) { +bool MotionController::ShouldRaiseWake(bool isSleeping) { if ((x + 335) <= 670 && z < 0) { - if (not isSleeping) { + if (!isSleeping) { if (y <= 0) { return false; } - lastYForWakeUp = 0; + lastYForRaiseWake = 0; return false; } if (y >= 0) { - lastYForWakeUp = 0; + lastYForRaiseWake = 0; return false; } - if (y + 230 < lastYForWakeUp) { - lastYForWakeUp = y; + if (y + 230 < lastYForRaiseWake) { + lastYForRaiseWake = y; return true; } } diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index fce8b53f..eb8d04aa 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -44,7 +44,7 @@ namespace Pinetime { } bool ShouldShakeWake(uint16_t thresh); - bool Should_RaiseWake(bool isSleeping); + bool ShouldRaiseWake(bool isSleeping); int32_t CurrentShakeSpeed() const { return accumulatedSpeed; @@ -76,7 +76,7 @@ namespace Pinetime { TickType_t time = 0; int16_t x = 0; - int16_t lastYForWakeUp = 0; + int16_t lastYForRaiseWake = 0; int16_t lastY = 0; int16_t y = 0; int16_t lastZ = 0; -- cgit v1.2.3-70-g09d2