adds support for 9-key remote and intensity/speed repeat actions #964
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.
Made a small refactor of how the repeat signal was handled for brightness. If I followed the existing patterns, I would have added a third 'or' to a couple of if statements. That pattern would quickly get out of hand with more remote codes to handle.
Instead I used a similar pattern to how the lastValidCode is tracked. It now also tracks the last valid action that was taken and it's corresponding value.
Actions are all defined in the ir_codes.h file. Power on/off and changes to brightness, intensity, speed.
I didn't have to touch much else except for breaking out an explicit changeBrightness function similar to the existing changeEffectxxx functions.
Pardon new remote support and repeat actions in a single PR. I wasn't planning on doing the repeat actions until I was in too deep already. :)