-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 grouping for LEDs #5788
Add grouping for LEDs #5788
Conversation
Signed-off-by: Julian Schill <j.schill@web.de>
Signed-off-by: Julian Schill <j.schill@web.de>
3ebc8a4
to
85a2310
Compare
Signed-off-by: Julian Schill <j.schill@web.de>
85a2310
to
475a4a2
Compare
Signed-off-by: Julian Schill <j.schill@web.de>
Thanks. Can you provide some background on why this feature is useful? Why would users want to organize LEDs into "virtual chains"? Can they use macros or display_templates for the same effect? Separately, at a minimum, this code would need to be reworked to not "peek" into member variables of external classes. -Kevin |
I can think of two setups where this is useful. Second application are several chains on different pins, that should be switched together. Like 4 chains on the top of the printer connected to four pins on the MCU. So you could switch them on and off with one command or apply a display template on all of them. I think this could partly done by macros, but it would be much more convenient to have such an abstraction layer. This could then also be used by the frontends to switch those LEDs directly. So you could add a color selector for each LED group. I will rework the code to use getter and setter functions. |
currently, I am also working on neopixel groups in mainsail. however, these are only "virtual" and therefore a single GUI solution. furthermore, I therefore also have to send a lot of gcode every time several neopixels are addressed. this would also look cleaner with the groups in klipper. because I currently only have the stealthburner with neopixels (i personally don't use many light effects in my printers), I can only show it from this setup. mainsail always sends 2 lines for the nozzle LEDs. but if users have 10 neopixels per group, it will be a lot of gcode... so I would very much welcome this function in klipper. just my 2 cents... |
Signed-off-by: Julian Schill <j.schill@web.de>
I reworked the code and added a getter for the led helper. So it should not peeking into other classes anymore. Let me know if you see other code issues. Also because the led_helper is now looking up the name, the new format for the configuration is:
So the type of the LED is not needed anymore. Therefore I added a check so all LED names are unique (I think that was missing in the current code). |
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
Thanks. I noticed a couple of things looking through this PR:
Finally, I'm not sure I'm a good candidate to review this PR. I don't have any extensive LED setups and it's not a particular area of interest to me. Klipper needs more core developers willing to review PRs - without that, I fear this PR will not get sufficient review attention. -Kevin |
Unfortunately a reviewer has not assigned themselves to this GitHub Pull Request and it is therefore being closed. It is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
sad it was closed. I have mini12864 with 3 neopixels and I wanted to split them into display backlight and encoder leds to maybe have effects on encoder but I don't sure I can do that in stock klipper |
Shame this was dismissed. If you daisy chain LED Rings,for example,this is extremely useful! |
Signed-off-by: Brochard Pierre <elenedeath@gmail.com>
This adds the functionality to create groups of LEDs to either separate a chain or combine multiple chains to one big LED chain.
Configuration is like this:
The indexing is then done in the order of the group definition.
The code was partly taken out from the LED effect module, created by Paul McGowan and maintained by me.
Signed-off-by: Julian Schill j.schill@web.de