summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-04-19 15:28:38 +0100
committerJoaquim <joaquim.org@gmail.com>2021-04-19 15:28:38 +0100
commitcd4a3e1dfef7d9803aa726ef4c177a6d7d5e876d (patch)
tree00c3d4d8672b8eea29981e40c696c839093a9ef3 /src/components
parentbbc24e88b0e2126be39b073ffd734b2ab07c225d (diff)
New Steps app
Settings to set the steps goal More detail in Motion app New 42px Font
Diffstat (limited to 'src/components')
-rw-r--r--src/components/motion/MotionController.h6
-rw-r--r--src/components/settings/Settings.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h
index 5881997f..d56fc7a5 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -8,9 +8,9 @@ namespace Pinetime {
public:
void Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps);
- uint16_t X() const { return x; }
- uint16_t Y() const { return y; }
- uint16_t Z() const { return z; }
+ int16_t X() const { return x; }
+ int16_t Y() const { return y; }
+ int16_t Z() const { return z; }
uint32_t NbSteps() const { return nbSteps; }
bool ShouldWakeUp(bool isSleeping);
diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h
index 9cbbee62..f444cdc6 100644
--- a/src/components/settings/Settings.h
+++ b/src/components/settings/Settings.h
@@ -60,6 +60,12 @@ namespace Pinetime {
};
Controllers::BrightnessController::Levels GetBrightness() const { 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:
Pinetime::Drivers::SpiNorFlash& spiNorFlash;