summaryrefslogtreecommitdiff
path: root/src/components/motion/MotionController.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-01-04 20:48:20 (GMT)
committerJean-François Milants <jf@codingfield.com>2022-01-04 20:48:20 (GMT)
commitdc8be2244ceb46fb58d2706935dc05b2d0ecdf8c (patch)
tree8e955bb1b6c11c65afcc30eb39174ab20bfa0437 /src/components/motion/MotionController.h
parentb8b54f47a2a09e32186bf7d8dddc658fae2c6e5f (diff)
parentbef3e708f6b5a6f71797f72aab89d09520813046 (diff)
Merge branch 'geekbozu-ShakeWake' into develop
Diffstat (limited to 'src/components/motion/MotionController.h')
-rw-r--r--src/components/motion/MotionController.h10
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