diff options
Diffstat (limited to 'src/components/motion')
-rw-r--r-- | src/components/motion/MotionController.cpp | 3 | ||||
-rw-r--r-- | src/components/motion/MotionController.h | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp index bad9d45f..e9ee314b 100644 --- a/src/components/motion/MotionController.cpp +++ b/src/components/motion/MotionController.cpp @@ -31,3 +31,6 @@ bool MotionController::ShouldWakeUp(bool isSleeping) { } return false; } +void MotionController::IsSensorOk(bool isOk) { + isSensorOk = isOk; +} diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index dbbbf910..5881997f 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -14,13 +14,16 @@ namespace Pinetime { uint32_t NbSteps() const { return nbSteps; } bool ShouldWakeUp(bool isSleeping); - private: + void IsSensorOk(bool isOk); + bool IsSensorOk() const { return isSensorOk; } + + private: uint32_t nbSteps; int16_t x; int16_t y; int16_t z; int16_t lastYForWakeUp = 0; - + bool isSensorOk = false; }; } }
\ No newline at end of file |