mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 04:54:11 -06:00
fan: Allow the fan shutdown_speed to be configured
Add a shutdown_speed config option to fans so that users can specify the speed on a shutdown event. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
5712283e91
commit
2740838b2e
5 changed files with 41 additions and 25 deletions
|
@ -12,10 +12,9 @@ class PrinterHeaterFan:
|
|||
self.printer = config.get_printer()
|
||||
self.heater_name = config.get("heater", "extruder0")
|
||||
self.heater_temp = config.getfloat("heater_temp", 50.0)
|
||||
self.fan = fan.PrinterFan(config)
|
||||
self.fan = fan.PrinterFan(config, default_shutdown_speed=1.)
|
||||
self.mcu = self.fan.mcu_fan.get_mcu()
|
||||
self.fan_speed = config.getfloat("fan_speed", 1., minval=0., maxval=1.)
|
||||
self.fan.set_shutdown_speed(1.)
|
||||
def printer_state(self, state):
|
||||
if state == 'ready':
|
||||
pheater = self.printer.lookup_object('heater')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue