-
Notifications
You must be signed in to change notification settings - Fork 1
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
Decide how to implement LED modes #20
Comments
Do I leave updating in core, or do I use a plugin, like Kaleidoscope's LEDControl module? LED modes must still be plugins, because they might respond to input, but they needn't be called except via LEDControl. That way, inactive modes don't get their hook functions needlessly called. Maybe there should be a global brightness scaling function that gets applied to all modes. Instead of doing an array lookup, maybe a simple algorithm could translate values to output. |
I think I want to go one step farther than Kaleidoscope's LEDControl, and have it pass through not just the LED-update functions, but also the hook functions. On another note, the tricky part is when multiple plugins are all trying to update LEDs. Maybe there should be a two-phase update system, where plugins can update all LEDs (to a single color), then that can be overridden by others that set individual keys. Furthermore, maybe I want to move the updates into the core, and have a hook function for LED updates, run just before the LEDs are updated by sending to the hardware. Maybe this would make it easier to optimize out that code on keyboards without lights, because those hook functions would never get called, because the update function in hooks doesn't get overridden? |
One of the design goals should be to have an easy way to optimize out plugin code that exists only to update LEDs. |
No description provided.
The text was updated successfully, but these errors were encountered: