InfiniTime
InfiniTime copied to clipboard
Improves UX for charging indicator on Quick Settings
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
Build size and comparison to main:
| Section | Size | Difference |
|---|---|---|
| text | 379204B | 0B |
| data | 944B | 0B |
| bss | 22536B | 0B |
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)
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.
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
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 :)
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.
No worries at all, whenever you're ready for review just say and I'll try take a look