Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds support for 9-key remote and intensity/speed repeat actions #964

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

kareem613
Copy link
Contributor

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. :)

@Aircoookie
Copy link
Owner

Yep, I agree this change makes it easier to maintain. Thank you!

@Aircoookie Aircoookie merged commit 2049e8b into Aircoookie:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants