InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Improves UX for charging indicator on Quick Settings

Open SteveAmor opened this issue 9 months ago • 4 comments
trafficstars

The current Quick Settings lv_task period is 5000 msecs. With a screen timeout of 5 seconds, you only just see the charge icon appear in the status bar at the top of the watchface. This PR reduces the period to 100 msecs so as soon as you put it on the charger, the charge icon appears. And when you take it off the charger, it quickly disappears. There are a couple of other screens which this charging UX is poor (it's just not "snappy"): Tile.cpp BatteryInfo.cpp

SteveAmor avatar Feb 19 '25 18:02 SteveAmor

Build size and comparison to main:

Section Size Difference
text 379204B 0B
data 944B 0B
bss 22536B 0B

Run in InfiniEmu

github-actions[bot] avatar Feb 19 '25 18:02 github-actions[bot]

If you're feeling up to it, I think a review of every screen not using LV_DISP_DEF_REFR_PERIOD would be good step forward in terms of improving responsiveness. There's probably a reason for the slow refreshes in some places - maybe performance of other things on the screen, maybe designs that don't use DirtyValue and therefore redraw things every frame, maybe bugs which have long been fixed, who knows! In most cases I think updating every refresh should be fine as there should be no drawing to do if nothing has changed (but some refactoring may be needed to allow this e.g if DirtyValue needs to be added)

mark9064 avatar Feb 23 '25 18:02 mark9064

I've been getting my head around the drawing of each screen and the lv_task callbacks and will try to have a further look at a general review.
There appears to be an intention in doc/code/Apps.md but no code, that I can see, uses Refresh() as the callback.

SteveAmor avatar Feb 23 '25 21:02 SteveAmor

Sounds good, feel free to ask any questions (here or the pinetime-dev chat channel). I'm happy to explain general things too if an overview on a part would be useful

mark9064 avatar Feb 24 '25 00:02 mark9064

How's it going? I'm happy to look at reviewing just this change for now and equally happy with waiting if you're planning on reviewing more places where the refresh time is long, just let me know :)

mark9064 avatar Aug 07 '25 22:08 mark9064

How's it going? I'm happy to look at reviewing just this change for now and equally happy with waiting if you're planning on reviewing more places where the refresh time is long, just let me know :)

Hi @mark9064 I've not been able to progress this to look at all of the code. It is on my mind that I really should but it won't be for a while.

SteveAmor avatar Aug 08 '25 06:08 SteveAmor

No worries at all, whenever you're ready for review just say and I'll try take a look

mark9064 avatar Aug 08 '25 21:08 mark9064