Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
8.99k stars 5.17k forks source link

Add grouping for LEDs for use as separate chain on a single gpio #6446

Open Elenedeath opened 5 months ago

Elenedeath commented 5 months ago

I reused the code made by julianschill one year ago on this pull request https://github.com/Klipper3d/klipper/pull/5788 and correct something KevinOConnor say about raise self.printer.config_error() maybe now the pull request by accepted.

for the short description made by julianschill

This adds the functionality to create groups of LEDs to either separate a chain or combine multiple chains to one big LED chain.

Configuration made by me and use on my BLV MGN Cube:

[neopixel _status_panel]
pin: PD3
chain_count: 48
color_order: GRB
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 0.0

[led_group status_panel1]
leds:
  _status_panel (1-16)

[led_group status_panel2]
leds:
  _status_panel (17-32)

[led_group status_panel3]
leds:
  _status_panel (33-48)

I use this script https://github.com/Elenedeath/klipper-neopixel to have a working panel with 3 different information on it. this is a little video to show it in action https://www.youtube.com/watch?v=7i_VIg28kKw

this is my start gcode:

  M117 Heating bed...
  _NEOPIXEL_DISPLAY LED=status_panel3 TYPE=bed_temp MODE=progress NUMBERS=16
  M190 S{params.BED_TEMP|default(printer.heater_bed.target, true)  }; wait for bed to heat up
  M117 Heating extruder...
  _NEOPIXEL_DISPLAY LED=status_panel2 TYPE=extruder_temp MODE=progress NUMBERS=16
  M109 S{params.EXTRUDER_TEMP|default(printer.extruder.target, true) }; wait for extruder to heat up
  M117 Printing...
  _NEOPIXEL_DISPLAY LED=status_panel1 TYPE=print_percent MODE=progress NUMBERS=16

and i can chain another neopixel without the need to specific another gpio for it, only need a new group.

on this example, i have status_panel1 for print_percent, status_panel2 for extruder_temp and status_panel3 for bed_temp

ps: i closed and reopen a new pr like this all my commits are signed off correctly #6445

Signed-off-by: Brochard Pierre elenedeath@gmail.com

github-actions[bot] commented 5 months ago

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:

  1. Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
  2. Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
  3. Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.

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, ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

julianschill commented 2 months ago

Thank you for picking this up again and fixing the issue of the original PR. I would really like this feature to be merged to Klipper. I am completely fine with reusing the code from the original PR for this one. Let me know if I can be of any help.