File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -434,12 +434,13 @@ void WatchFaceInfineat::Refresh() {
434434
435435 batteryPercentRemaining = batteryController.PercentRemaining ();
436436 isCharging = batteryController.IsCharging ();
437- if (batteryController.IsCharging ()) { // Charging battery animation
438- chargingBatteryPercent += 1 ;
437+ if (batteryController.IsCharging () && ( lv_tick_get () - savedAnimationTick > 150 ) ) { // Charging battery animation
438+ chargingBatteryPercent += 3 ; // 100% / pine_small height = 3
439439 if (chargingBatteryPercent > 100 ) {
440440 chargingBatteryPercent = batteryPercentRemaining.Get ();
441441 }
442442 SetBatteryLevel (chargingBatteryPercent);
443+ savedAnimationTick = lv_tick_get ();
443444 } else if (isCharging.IsUpdated () || batteryPercentRemaining.IsUpdated ()) {
444445 chargingBatteryPercent = batteryPercentRemaining.Get ();
445446 SetBatteryLevel (chargingBatteryPercent);
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ namespace Pinetime {
4646
4747 private:
4848 uint32_t savedTick = 0 ;
49+ uint32_t savedAnimationTick = 0 ;
4950 uint8_t chargingBatteryPercent = 101 ; // not a mistake ;)
5051
5152 Utility::DirtyValue<uint8_t > batteryPercentRemaining {};
You can’t perform that action at this time.
0 commit comments