File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -434,12 +434,13 @@ void WatchFaceInfineat::Refresh() {
434
434
435
435
batteryPercentRemaining = batteryController.PercentRemaining ();
436
436
isCharging = batteryController.IsCharging ();
437
- if (batteryController.IsCharging ()) { // Charging battery animation
438
- chargingBatteryPercent += 1 ;
437
+ if (batteryController.IsCharging () && ( uint32_t ( lv_tick_get () - savedAnimationTick) > 150 ) ) { // Charging battery animation
438
+ chargingBatteryPercent += 3 ; // 100% / pine_small height = 3
439
439
if (chargingBatteryPercent > 100 ) {
440
440
chargingBatteryPercent = batteryPercentRemaining.Get ();
441
441
}
442
442
SetBatteryLevel (chargingBatteryPercent);
443
+ savedAnimationTick = lv_tick_get ();
443
444
} else if (isCharging.IsUpdated () || batteryPercentRemaining.IsUpdated ()) {
444
445
chargingBatteryPercent = batteryPercentRemaining.Get ();
445
446
SetBatteryLevel (chargingBatteryPercent);
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ namespace Pinetime {
46
46
47
47
private:
48
48
uint32_t savedTick = 0 ;
49
+ uint32_t savedAnimationTick = 0 ;
49
50
uint8_t chargingBatteryPercent = 101 ; // not a mistake ;)
50
51
51
52
Utility::DirtyValue<uint8_t > batteryPercentRemaining {};
You can’t perform that action at this time.
0 commit comments