diff --git a/README.md b/README.md index ed24766..4a0fabd 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Stop Klipper: Link the file in the Klipper directory (adjust the paths as needed): - ln -s klipper-led_effect/led_effect.py ~/klipper/klippy/extras/led_effect.py + ln -s klipper-led_effect/src/led_effect.py ~/klipper/klippy/extras/led_effect.py Start Klipper: diff --git a/src/led_effect.py b/src/led_effect.py index cbf92f4..949764e 100644 --- a/src/led_effect.py +++ b/src/led_effect.py @@ -930,7 +930,7 @@ def nextFrame(self, eventtime): if heaterTarget > 0.0 and heaterCurrent > 0.0: if (heaterCurrent >= self.effectRate): if (heaterCurrent <= heaterTarget-2): - s = int(((heaterCurrent - self.effectRate) / heaterTarget) * 200) + s = int(((heaterCurrent - self.effectRate) / (heaterTarget - self.effectRate)) * 200) s = min(len(self.thisFrame)-1,s) return self.thisFrame[s] elif self.effectCutoff > 0: