diff options
author | Aidan Epstein <aidan@jmad.org> | 2021-12-09 17:59:48 -0800 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2022-08-04 22:52:45 +0200 |
commit | e13172384b8ec3fcb1644ccc974bc64147f17610 (patch) | |
tree | f09af7b970f176c07761b99158878b8ff2e68155 /src | |
parent | b768829c633dd8fa344b744382d7d75c71c4229f (diff) |
Wrap PineTimeStyle step counter
This changes the PineTimeStyle step counter gauge continues counting
with wraparound after you achieve your step goal.
Diffstat (limited to 'src')
-rw-r--r-- | src/displayapp/screens/WatchFacePineTimeStyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp index 63b421da..8689a98c 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp +++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp @@ -431,7 +431,7 @@ void WatchFacePineTimeStyle::Refresh() { stepCount = motionController.NbSteps(); motionSensorOk = motionController.IsSensorOk(); if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) { - lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / (settingsController.GetStepsGoal() / 100))); + lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / (settingsController.GetStepsGoal() / 100)) % 100); lv_obj_realign(stepGauge); if (stepCount.Get() > settingsController.GetStepsGoal()) { lv_obj_set_style_local_line_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); |