InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Provide callback for watch face to react to LCD state changes

Open ljahn opened this issue 1 year ago • 1 comments

This provides a callback for watch faces to get notified about changes to the LCD state, meaning when it turns on and off or switches to and from the reduced color range of the Always On Display.

Example: My Star Trek watch face changes to different colors in AOD mode to enhance readability. It also has the option to animate the elements appearing when the watch face is opened.

This requires no changes to any watch face if the functionality is not used there, since it is a virtual void with an empty default implementation.

However, it adds an additional 100 tick delay on LCD sleep since lv_task_handler is not called in idle mode and we need time for one display refresh before entering idle. For AOD there is a similar thing with the display refresh rate decreasing, so updating before AOD is faster.

ljahn avatar Dec 23 '24 20:12 ljahn

Build size and comparison to main:

Section Size Difference
text 373280B 464B
data 948B 0B
bss 22536B 0B

github-actions[bot] avatar Dec 23 '24 20:12 github-actions[bot]