-
Notifications
You must be signed in to change notification settings - Fork 58
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
Improved three-channel interface and 3-channel strobes #114
Open
fwiffo
wants to merge
11
commits into
ToyKeeper:trunk
Choose a base branch
from
fwiffo:improved_3ch
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The first 7 channels now follow the same sequence as AUX LEDs. I.e. if the channels were red, green, and blue, the sequence would be red, yellow, green, cyan, blue, magenta, and white. The remaining channels are HSV, 3-channel auto-tint, and RGB AUX. Removes the 2-channel tintramp modes since there is a limit of 16 channels and HSV mode covers those combinations with a more general interface. Next step will be adding explict control for saturation so that all possible 3-channel combinations will be explicitly possible in HSV mode.
This allows for a "saturation" parameter in HSV modes on 3-channel lights. This uses 4H, thus removing momentary turbo from channels that require a second channel arg. This is a silly way to implement it; it would be nice to be more generic and allow for some struct or arbitrary number of channel args or something, but how many lights need more than 2 channel args, and you'd need to do something like 23H to manage it all.
If a light has a custom 3H function specified for a channel, it would always call the custom function, not just during 3H events. It would only return if the event was handled by the custom function, but would fall out of the if/else otherwise, preventing later events from being handled. This prevented access to the 9H channel config in HSV mode, for instance.
Instead of bracketing the set_level() with saving/restoring the existing channel_args, it instead puts them around save_config() calls. This feels brittle, but an alternative - exposing a function that bypasses set_level() to set HSV more directly - also feels brittle.
Brightness is still adjusted with 1H and 2H as with other modes, and saturation is still available with 4H as it is in regular ramp mode on the HSV channel.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements the 3-channel features described in #113