summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/motion/MotionController.cpp7
-rw-r--r--src/components/motion/MotionController.h14
-rw-r--r--src/components/settings/Settings.h14
3 files changed, 3 insertions, 32 deletions
diff --git a/src/components/motion/MotionController.cpp b/src/components/motion/MotionController.cpp
index 4a7a7eb..aa2f3ee 100644
--- a/src/components/motion/MotionController.cpp
+++ b/src/components/motion/MotionController.cpp
@@ -2,15 +2,10 @@
#include "os/os_cputime.h"
using namespace Pinetime::Controllers;
-void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps) {
+void MotionController::Update(int16_t x, int16_t y, int16_t z) {
this->x = x;
this->y = y;
this->z = z;
- int32_t deltaSteps = nbSteps - this->nbSteps;
- this->nbSteps = nbSteps;
- if (deltaSteps > 0) {
- currentTripSteps += deltaSteps;
- }
}
bool MotionController::Should_RaiseWake(bool isSleeping) {
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h
index 5385658..5200b41 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -13,7 +13,7 @@ namespace Pinetime {
BMA425,
};
- void Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps);
+ void Update(int16_t x, int16_t y, int16_t z);
int16_t X() const {
return x;
@@ -24,16 +24,6 @@ namespace Pinetime {
int16_t Z() const {
return z;
}
- uint32_t NbSteps() const {
- return nbSteps;
- }
-
- void ResetTrip() {
- currentTripSteps = 0;
- }
- uint32_t GetTripSteps() const {
- return currentTripSteps;
- }
bool Should_ShakeWake(uint16_t thresh);
bool Should_RaiseWake(bool isSleeping);
@@ -50,8 +40,6 @@ namespace Pinetime {
void Init(Pinetime::Drivers::Bma421::DeviceTypes types);
private:
- uint32_t nbSteps;
- uint32_t currentTripSteps = 0;
int16_t x;
int16_t y;
int16_t z;
diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h
index 2d26664..8a32efa 100644
--- a/src/components/settings/Settings.h
+++ b/src/components/settings/Settings.h
@@ -147,22 +147,10 @@ namespace Pinetime {
return settings.brightLevel;
};
- void SetStepsGoal(uint32_t goal) {
- if (goal != settings.stepsGoal) {
- settingsChanged = true;
- }
- settings.stepsGoal = goal;
- };
-
- uint32_t GetStepsGoal() const {
- return settings.stepsGoal;
- };
-
private:
- static constexpr uint32_t settingsVersion = 0x4001; // infinitime redux settings
+ static constexpr uint32_t settingsVersion = 0x4011; // infinitime redux settings
struct SettingsData {
uint32_t version = settingsVersion;
- uint32_t stepsGoal = 10000;
uint32_t screenTimeOut = 15000;
ClockType clockType = ClockType::H24;