From d034bd131e11fd2a2ab33058991802aab7cfa305 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Tue, 19 Oct 2021 23:42:48 -0400 Subject: Added "lap" button to step counter --- src/components/motion/MotionController.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/components') 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; -- cgit v1.2.3-70-g09d2