julianschill / klipper-led_effect

LED effects plugin for klipper
GNU General Public License v3.0
647 stars 117 forks source link

Homing Effect #147

Closed claudermilk closed 1 year ago

claudermilk commented 1 year ago

The homing effect doesn't seem to be working. I'm not getting a response when an effect is just set to flash white on homing (currently SB with spec nozzle LEDs & Rainbow Barf logo). Using spec switch X & Y endstops with the PCB and Tap for Z.

julianschill commented 1 year ago

Post the config of the effect

claudermilk commented 1 year ago

homing 16 00 top (1.0,1.0,1.0)

Set to flash white and fade slowly just to see if it does anything. I'm pretty sure this is ok from the docs. I generated it from within the simulator. I have it combined with breathing, but I still get nothing even when eliminating all other effect layers.

julianschill commented 1 year ago

The layer looks ok and works for me in the simulator. Please post the complete config of the effect.

claudermilk commented 1 year ago

Here's the full definition for the SB LEDs. Rainbow Barf in the logo, spec NeoPixels in the nozzle. This works in the simulator for me, just not on the actual printer.

[led_effect nozzle_homing] leds: neopixel:sb_leds (9,10) autostart: false frame_rate: 24 layers: breathing 8 0 add (0,0.6,0.2),(0,0.46,0.15) homing 16 00 top (1.0,1.0,1.0)

[led_effect logo_homing] leds: neopixel:sb_leds (1-8) autostart: false frame_rate: 24 layers: breathing 8 0 add (0,0.6,0.2),(0,0.46,0.15) chase 0.25 0.25 add (0,0.6,0.2) homing 16 00 top (1.0,1.0,1.0)

julianschill commented 1 year ago

You didn't specify which endstops to react on. See the documentation here: https://github.com/julianschill/klipper-led_effect/blob/master/docs/LED_Effect.md#additional-effect-level-parameters

Add the "endstops" parameter to the effect.

Example:

[led_effect nozzle_homing]
leds:
  neopixel:sb_leds (9,10)
autostart: false
frame_rate: 24
endstops: x, y, probe
layers:
  breathing 8 0 add (0,0.6,0.2),(0,0.46,0.15)
  homing 16 00 top (1.0,1.0,1.0)
claudermilk commented 1 year ago

That works! I added endstops: x, y, z and it works as expected. probe did not work for Z.

I think the requirement for the endstops parameter should be with the main Homing section.

julianschill commented 1 year ago

It's explained further up in the "additional parameters" section. But I agree, documentation needs a rework. When using a virtual endstop for Z it will trigger on "z", when homing and on "probe" when meshing or QGLing.