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

add: LED widgets #1120

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

add: LED widgets #1120

wants to merge 6 commits into from

Conversation

crides
Copy link
Contributor

@crides crides commented Feb 5, 2022

Fixes #1003

Currently has the config in C, see example here. You also need to setup a LED device as shown here. It would be better to put the config in devicetree, however there are some macro issues to be resolved before that could be done. Having the config in devicetree means that the config is better structured, and is less janky (see below) compared to the current C implementation. However, it also means that rebuilding is slower due to the nature of processing devicetrees in Zephyr.

Issues:

  • The C config is janky, and uses embedded arrays to allow for easier config and macro generation. There are magic numbers for the (max) size of those embedded arrays. This could either be solved by having actual configuration items for them, or have smarter macros (probably hard)
  • Currently this only supports single LEDs, whether PWM or not should work fine; support for addressable LED isn't a technical problem, and I'll see what needs to be done to adapt the config/interface
  • No animations supported

@alinelena
Copy link

i have played with the layer led widget and works for "normal" layers but if you use a conditional layer the indicator does not work when this layer is activated.

example here
https://github.com/alinelena/zmk/tree/mlego2/app/boards/shields/mlego2x2

@crides crides requested a review from a team as a code owner June 10, 2023 06:36
@crides crides force-pushed the led-widgets branch 2 times, most recently from d0f56bc to 209a516 Compare June 10, 2023 07:11
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.

Feature: LED widgets
2 participants