aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
Diffstat (limited to 'klippy')
-rw-r--r--klippy/extras/fan.py2
-rw-r--r--klippy/extras/heater_fan.py6
2 files changed, 3 insertions, 5 deletions
diff --git a/klippy/extras/fan.py b/klippy/extras/fan.py
index 929ad172..d59d777f 100644
--- a/klippy/extras/fan.py
+++ b/klippy/extras/fan.py
@@ -19,7 +19,7 @@ class PrinterFan:
hardware_pwm = config.getboolean('hardware_pwm', False)
self.mcu_fan.setup_cycle_time(cycle_time, hardware_pwm)
def set_speed(self, print_time, value):
- value = max(0., min(self.max_power, value))
+ value = max(0., min(self.max_power, value * self.max_power))
if value == self.last_fan_value:
return
print_time = max(self.last_fan_time + FAN_MIN_TIME, print_time)
diff --git a/klippy/extras/heater_fan.py b/klippy/extras/heater_fan.py
index 5d2d6f44..7cbcfc2a 100644
--- a/klippy/extras/heater_fan.py
+++ b/klippy/extras/heater_fan.py
@@ -14,10 +14,8 @@ class PrinterHeaterFan:
self.heater_temp = config.getfloat("heater_temp", 50.0)
self.fan = fan.PrinterFan(config)
self.mcu = self.fan.mcu_fan.get_mcu()
- max_power = self.fan.max_power
- self.fan_speed = config.getfloat(
- "fan_speed", max_power, minval=0., maxval=max_power)
- self.fan.mcu_fan.setup_start_value(0., max_power)
+ self.fan_speed = config.getfloat("fan_speed", 1., minval=0., maxval=1.)
+ self.fan.mcu_fan.setup_start_value(0., self.fan.max_power)
def printer_state(self, state):
if state == 'ready':
pheater = self.printer.lookup_object('heater')