aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/motion/MotionController.h
diff options
context:
space:
mode:
authorSteveAmor <SteveAmor@users.noreply.github.com>2022-01-02 22:27:43 +0000
committerSteveAmor <SteveAmor@users.noreply.github.com>2022-01-02 22:27:43 +0000
commitcc259b6a4ac93d507fa372a41ea653dedeb791ea (patch)
tree3c8b8b937b2b91149003195679ce5acda1154c4d /src/components/motion/MotionController.h
parent94561b233136334c7507925b04a345adb0e6c769 (diff)
parente0013e730448f4dc142e3610f970f22c807ac41e (diff)
resolves conflicts
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 c72d8a4a..3eac7176 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -8,7 +8,7 @@ namespace Pinetime {
namespace Controllers {
class MotionController {
public:
- enum class DeviceTypes{
+ enum class DeviceTypes {
Unknown,
BMA421,
BMA425,
@@ -28,6 +28,13 @@ namespace Pinetime {
uint32_t NbSteps() const {
return nbSteps;
}
+
+ void ResetTrip() {
+ currentTripSteps = 0;
+ }
+ uint32_t GetTripSteps() const {
+ return currentTripSteps;
+ }
bool ShouldWakeUp(bool isSleeping);
void IsSensorOk(bool isOk);
@@ -44,6 +51,7 @@ namespace Pinetime {
private:
uint32_t nbSteps;
+ uint32_t currentTripSteps = 0;
int16_t x;
int16_t y;
int16_t z;