Provide callback for watch face to react to LCD state changes #2209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.