Wrap PineTimeStyle step counter
This changes the PineTimeStyle step counter gauge continues counting with wraparound after you achieve your step goal.
This commit is contained in:
parent
b768829c63
commit
e13172384b
|
@ -431,7 +431,7 @@ void WatchFacePineTimeStyle::Refresh() {
|
||||||
stepCount = motionController.NbSteps();
|
stepCount = motionController.NbSteps();
|
||||||
motionSensorOk = motionController.IsSensorOk();
|
motionSensorOk = motionController.IsSensorOk();
|
||||||
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
|
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);
|
lv_obj_realign(stepGauge);
|
||||||
if (stepCount.Get() > settingsController.GetStepsGoal()) {
|
if (stepCount.Get() > settingsController.GetStepsGoal()) {
|
||||||
lv_obj_set_style_local_line_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
|
lv_obj_set_style_local_line_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
|
||||||
|
|
Loading…
Reference in a new issue