aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/motion/MotionController.h
diff options
context:
space:
mode:
authorIsaac <114504394+ic-27@users.noreply.github.com>2023-06-17 15:37:53 +0000
committerGitHub <noreply@github.com>2023-06-17 17:37:53 +0200
commit9e128c838e8447049264ac4e9e6c882053ed4229 (patch)
treeb7cf9f752df5403b0f63b1d859a8295502c7ceed /src/components/motion/MotionController.h
parentf057894d2670712c316f69bd9aa3a66275a8b3e5 (diff)
ShakeWake: Fixed instant wake after sleep issue in certain positions (#1691)
* ShakeWake: Fixed instant wake after sleep issue in certain positions Add lastX var to track the previous x acceleration for correct calculation of speed. Reorder axes for clarity. --------- Co-authored-by: Isaac <114504394+isaacc27@users.noreply.github.com> Co-authored-by: FintasticMan <52415484+FintasticMan@users.noreply.github.com>
Diffstat (limited to 'src/components/motion/MotionController.h')
-rw-r--r--src/components/motion/MotionController.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h
index 87dbcd1f..c524fef3 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -67,6 +67,7 @@ namespace Pinetime {
TickType_t lastTime = 0;
TickType_t time = 0;
+ int16_t lastX = 0;
int16_t x = 0;
int16_t lastYForRaiseWake = 0;
int16_t lastY = 0;