Add screensaver-like abilities (block animations on activity; shutdown LEDs on inactivity) #309
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.
Playing with a new Kira and tried to add a basic screensaver-like capability to the firmware to get familiar with the code base.
I'm sleeping not that far from my keyboard, so I wanted to stop the LED lightning if I stop typing for too long.
Plus the Kira always animates to 'wave' by default and I felt it was weird to have animations while I'm typing. So the PR allows us to pause animation when the typist press some key, and resume it some x ms later.
To do that kind of stuff, I tried a bit to look first at the KLL spec, but the 'Timing' section doesn't seem to do the trick. Then I looked a bit at interrupts in the code base but it seemed too messy (architecture dependent?), so I just ended by using the Periodic_* functions on a larger timescale (see 2nd commit).
By default, the screensaver option is disabled (see comments in Macro/PixelMap/capabilities.kll to enable it, 3rd commit).