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

Allow for duplicate entry/exit led definition #620

Open
ripnet opened this issue Feb 4, 2025 · 3 comments
Open

Allow for duplicate entry/exit led definition #620

ripnet opened this issue Feb 4, 2025 · 3 comments
Labels
feature request New feature or request

Comments

@ripnet
Copy link

ripnet commented Feb 4, 2025

Low priority request, but I have duplicated LEDs in my MMU and I would love to be able to light them all up. There are "exit" LEDs on both the spool rewinders and on the skirt of the machine itself.

I am asking for something like:

[mmu_leds]
exit_leds:    neopixel:mmu_leds_1 (2-5)
              neopixel:mmu_leds_2 (1-5)
entry_leds:   neopixel:mmu_leds_3 (6-10)
              neopixel:mmu_leds_3 (1-5)
exit_leds:    neopixel:mmu_leds_3 (16-20)
              neopixel:mmu_leds_3 (11-15)
frame_rate: 24

Right now, it seems that the ones that were last defined take precedence and the early ones don't turn on.

@moggieuk
Copy link
Owner

moggieuk commented Feb 4, 2025

I do see an error in this setup BTW (maybe just a type)
I see 9 leds on initial exit
but 10 on on entry and second exit

I'll add as feature request but it will be low priority... you obviously love LEDs. Lol. Technically the LED support is all done in macros (after h/w setup which can also be done) so you could add this yourself...

@moggieuk moggieuk added the feature request New feature or request label Feb 4, 2025
@ripnet
Copy link
Author

ripnet commented Feb 5, 2025

Good catch -- I fixed that after I posted this.

Thanks for your consideration. Can you call multiple printer.add_object() with the same parameter name? (ie mmu_exit_leds) ? I feel like the last is overwriting the first, and then the macro can only use the last one:

SET_LED LED=mmu_{segment}_leds

I'm willing to code this myself and submit a PR, but curious how you would tackle this. Create an indexed segment (mmu_exit0_leds, mmu_exit1_leds, etc)? Let me know what you think.

FWIW, I tried using the virtual_led plugin but it seems to be broken after a recent-ish klipper update. My thought was to add each exit led as it's own group and enumerate them individually.

@moggieuk
Copy link
Owner

The virtual led plugin has been broken for a while but you don't need it with HH -- it has equivalent functionality. I turn the specification in [mmu_leds] into a set of virtual leds already. The index being the gate number. So the change would be to (i) create another set of virtual leds, (ii) update the _MMU_LED's macros in mmu_leds.cfg to cope with multiple sets.

Caution though, some have found that excessive LED use has led to Timer Too Close errors so I don't want to do anything that makes that worse...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants