summaryrefslogtreecommitdiff
path: root/src/components/motion
diff options
context:
space:
mode:
authorStephanie <eng.steph@gmail.com>2021-10-19 23:42:48 -0400
committerJF <JF002@users.noreply.github.com>2021-12-30 21:51:43 +0100
commitd034bd131e11fd2a2ab33058991802aab7cfa305 (patch)
tree6bed888451fe39b03108eee6440b5f9e991e59c1 /src/components/motion
parentbaa5954724a91b81e35812ffd1939438689f3446 (diff)
Added "lap" button to step counter
Diffstat (limited to 'src/components/motion')
-rw-r--r--src/components/motion/MotionController.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h
index c72d8a4a..3b4d78b8 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -28,6 +28,12 @@ namespace Pinetime {
uint32_t NbSteps() const {
return nbSteps;
}
+ void SetPrevTotalSteps(uint32_t steps) {
+ stepsAtLastLap = steps;
+ }
+ uint32_t GetPrevTotalSteps() const {
+ return stepsAtLastLap;
+ }
bool ShouldWakeUp(bool isSleeping);
void IsSensorOk(bool isOk);
@@ -44,6 +50,7 @@ namespace Pinetime {
private:
uint32_t nbSteps;
+ uint32_t stepsAtLastLap = 0;
int16_t x;
int16_t y;
int16_t z;