klipper-led_effect icon indicating copy to clipboard operation
klipper-led_effect copied to clipboard

Fixes progress effect to turn off all LEDs when progress==0

Open guru-florida opened this issue 3 years ago • 3 comments

Previous Behavior

The first LED would always remain on even if progress==0. M74 P0 essentially has no effect.

Cause

  • The polling of the progress state would not change the internal printProgress variable when 0, due to an if p: statement evaluating to false
  • The first frame in the pre-rendered progress array [0...100] would still have the first LED set

Fix

  • Added an else clause to the if p: to set the internal variable to 0 if klipper progress state is None or 0
  • Implicitly added the first pre-rendered frame to be all LEDs off, frames [1..100] are rendered as normal
    • In my case, I have 10 LEDs. P0 will turn all off, P1 will turn the first one on, P11 will turn the second one on, etc.

guru-florida avatar Jul 20 '22 15:07 guru-florida

Is this repo / klipper plugin not actively supported anymore ?

akhamar avatar Aug 14 '22 17:08 akhamar

Is this repo / klipper plugin not actively supported anymore ?

I don't have a lot of time currently for testing, supporting and developing. I hope I will find more time in the next months.

julianschill avatar Aug 14 '22 18:08 julianschill

Nice ! Cool to see this plugin / repo is still alive. It's a great plugin.

akhamar avatar Aug 14 '22 22:08 akhamar