aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/motion/MotionController.cpp
diff options
context:
space:
mode:
authorFinlay Davidson <finlay.davidson@coderclass.nl>2023-03-05 15:34:03 +0100
committerRiku Isokoski <riksu9000@gmail.com>2023-03-09 10:17:03 +0200
commite55a76f740561378479eda5ff8c32e09db9f1693 (patch)
tree64d0e6c207380e1de4e1913baa50fdd6a9bce835 /src/components/motion/MotionController.cpp
parent49ad5be7423f983804e65dd1571cc5dcea26babc (diff)
raisewake: Change names in line with the style guide
Diffstat (limited to 'src/components/motion/MotionController.cpp')
-rw-r--r--src/components/motion/MotionController.cpp12
1 files changed, 6 insertions, 6 deletions
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;
}
}