diff options
| author | Jean-François Milants <jf@codingfield.com> | 2022-01-04 20:48:08 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2022-01-04 20:48:08 (GMT) |
| commit | bef3e708f6b5a6f71797f72aab89d09520813046 (patch) | |
| tree | 8e955bb1b6c11c65afcc30eb39174ab20bfa0437 /src/components/motion/MotionController.h | |
| parent | b8b54f47a2a09e32186bf7d8dddc658fae2c6e5f (diff) | |
| parent | e82469bffac6383ab898fa71dc3a88e164dc86ff (diff) | |
Merge branch 'ShakeWake' of https://github.com/geekbozu/InfiniTime into geekbozu-ShakeWake
# Conflicts:
# src/CMakeLists.txt
# src/displayapp/Apps.h
# src/displayapp/DisplayApp.cpp
# src/displayapp/screens/settings/Settings.cpp
Diffstat (limited to 'src/components/motion/MotionController.h')
| -rw-r--r-- | src/components/motion/MotionController.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h index 3eac717..f80b11b 100644 --- a/src/components/motion/MotionController.h +++ b/src/components/motion/MotionController.h @@ -35,8 +35,10 @@ namespace Pinetime { uint32_t GetTripSteps() const { return currentTripSteps; } - bool ShouldWakeUp(bool isSleeping); + bool Should_ShakeWake(uint16_t thresh); + bool Should_RaiseWake(bool isSleeping); + int32_t currentShakeSpeed(); void IsSensorOk(bool isOk); bool IsSensorOk() const { return isSensorOk; @@ -59,6 +61,12 @@ namespace Pinetime { 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; }; } }
\ No newline at end of file |
