diff options
author | Kieran Cawthray <kieranc@gmail.com> | 2021-07-12 13:01:11 +0200 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2021-07-12 13:01:11 +0200 |
commit | db99ac88d9b10a1a0f81291c171d5bafdf08fe0e (patch) | |
tree | 9bfa74096cff8a4f8cd08edbda01b7c0978b3bed /src/displayapp/screens/PineTimeStyle.cpp | |
parent | 2edf41be8eea79461a1f9b45a16d13f150c7e5d5 (diff) | |
parent | 4f378e8726fdcff72598aa6ed12eeaa6b3e61355 (diff) |
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpicker
Diffstat (limited to 'src/displayapp/screens/PineTimeStyle.cpp')
-rw-r--r-- | src/displayapp/screens/PineTimeStyle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp index 76db86e3..b27bd9c7 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -186,8 +186,8 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app, lv_obj_align(stepGauge, sidebar, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_gauge_set_scale(stepGauge, 360, 11, 0); lv_gauge_set_angle_offset(stepGauge, 180); - lv_gauge_set_critical_value(stepGauge, (settingsController.GetStepsGoal() / 100)); - lv_gauge_set_range(stepGauge, 0, (settingsController.GetStepsGoal() / 100)); + lv_gauge_set_critical_value(stepGauge, 100); + lv_gauge_set_range(stepGauge, 0, 100); lv_gauge_set_value(stepGauge, 0, 0); lv_obj_set_style_local_pad_right(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3); @@ -335,7 +335,7 @@ bool PineTimeStyle::Refresh() { stepCount = motionController.NbSteps(); motionSensorOk = motionController.IsSensorOk(); if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) { - lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / 100)); + lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / (settingsController.GetStepsGoal() / 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); |