diff options
| author | Finlay Davidson <finlay.davidson@coderclass.nl> | 2023-03-05 14:40:01 +0100 |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2023-03-09 10:17:03 +0200 |
| commit | 6cf6455313b9166b408d0edb5b369ba458b347a4 (patch) | |
| tree | f450b802dd07ce167adeba703ddb25a2d3e4f070 /src/components/motion/MotionController.h | |
| parent | f993311830df3ebe1d6ff4022aa3019a55f9bbd7 (diff) | |
shakewake: Switch to more generic last* vars
These could be used for other motion-based algorithms in the future.
Also fix includes.
Diffstat (limited to 'src/components/motion/MotionController.h')
| -rw-r--r-- | src/components/motion/MotionController.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index 9006b2a6..8fb03d81 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -1,8 +1,9 @@ #pragma once #include <cstdint> -#include <drivers/Bma421.h> -#include <components/ble/MotionService.h> + +#include "drivers/Bma421.h" +#include "components/ble/MotionService.h" namespace Pinetime { namespace Controllers { @@ -63,17 +64,18 @@ namespace Pinetime { private: uint32_t nbSteps; uint32_t currentTripSteps = 0; + int16_t x; + int16_t lastYForWakeUp = 0; + int16_t lastY = 0; int16_t y; + int16_t lastZ = 0; int16_t z; - int16_t lastYForWakeUp = 0; + bool isSensorOk = false; DeviceTypes deviceType = DeviceTypes::Unknown; Pinetime::Controllers::MotionService* service = nullptr; - int16_t lastXForShake = 0; - int16_t lastYForShake = 0; - int16_t lastZForShake = 0; int32_t accumulatedSpeed = 0; uint32_t lastShakeTime = 0; }; |
