summaryrefslogtreecommitdiff
path: root/src/components/motion/MotionController.h
diff options
context:
space:
mode:
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 c72d8a4..3eac717 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;