aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorJustin Schuh <code@justinschuh.com>2019-11-24 18:37:30 -0500
committerKevinOConnor <kevin@koconnor.net>2019-11-24 18:37:30 -0500
commit93f1e6dd86bf6168f2bae163213143063242391e (patch)
tree091d2f15bc44de0a0fb693cbcf161ce9c119a7e4 /klippy
parent05472bb8a311e6971877b7ecbb57e0bfd7087469 (diff)
downloadkutter-93f1e6dd86bf6168f2bae163213143063242391e.tar.gz
kutter-93f1e6dd86bf6168f2bae163213143063242391e.tar.xz
kutter-93f1e6dd86bf6168f2bae163213143063242391e.zip
FAN: Kick start fan when the increase is more than 50% (#2085)
Large increases in fan speed can suffer from acceleration lag, so this change kick starts the fan for a change of 50% or more in the same way that starting the fan from 0% does. Signed-off-by: Justin Schuh <code@justinschuh.com>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/extras/fan.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/fan.py b/klippy/extras/fan.py
index 0b5aac92..571d7052 100644
--- a/klippy/extras/fan.py
+++ b/klippy/extras/fan.py
@@ -42,8 +42,8 @@ class PrinterFan:
if value == self.last_fan_value:
return
print_time = max(self.last_fan_time + FAN_MIN_TIME, print_time)
- if (value and value < self.max_power
- and not self.last_fan_value and self.kick_start_time):
+ if (value and value < self.max_power and self.kick_start_time
+ and (not self.last_fan_value or value - self.last_fan_value > .5)):
# Run fan at full speed for specified kick_start_time
self.mcu_fan.set_pwm(print_time, self.max_power)
print_time += self.kick_start_time