diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-03-10 13:57:01 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-03-10 13:57:01 -0400 |
commit | d3f6dad85383c2435f15700dfaf685938fa3f367 (patch) | |
tree | 8bfbe4682570ddf4b9b03aa980e5baa850dabc2f | |
parent | 19c7955f2a181874884921b6f6e424571ea61202 (diff) | |
download | kutter-d3f6dad85383c2435f15700dfaf685938fa3f367.tar.gz kutter-d3f6dad85383c2435f15700dfaf685938fa3f367.tar.xz kutter-d3f6dad85383c2435f15700dfaf685938fa3f367.zip |
controller_fan: Allow multiple controller_fan sections to be defined
It may be necessary to define multiple fans, so allow each config
section to be named.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | config/example-extras.cfg | 5 | ||||
-rw-r--r-- | docs/Config_Changes.md | 3 | ||||
-rw-r--r-- | klippy/extras/controller_fan.py | 2 | ||||
-rw-r--r-- | test/klippy/temperature.cfg | 3 |
4 files changed, 10 insertions, 3 deletions
diff --git a/config/example-extras.cfg b/config/example-extras.cfg index 33563ebf..14a02d08 100644 --- a/config/example-extras.cfg +++ b/config/example-extras.cfg @@ -565,12 +565,13 @@ # is 1.0 -# Controller cooling fan. A "controller fan" is a fan that will be +# Controller cooling fan (one may define any number of sections with a +# "controller_fan" prefix). A "controller fan" is a fan that will be # enabled whenever its associated heater or any configured stepper # driver is active. The fan will stop, whenever an idle_timeout is # reached to ensure no overheating will occur after deactivating a # watched component. -#[controller_fan] +#[controller_fan my_controller_fan] #pin: #max_power: #shutdown_speed: diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 7a3e902e..8c20ed95 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -6,6 +6,9 @@ All dates in this document are approximate. # Changes +20190310: The [controller_fan] config section now always takes a name +(such as [controller_fan my_controller_fan]). + 20190308: The "driver_BLANK_TIME_SELECT" field in [tmc2130] and [tmc2208] config sections has been renamed to "driver_TBL". diff --git a/klippy/extras/controller_fan.py b/klippy/extras/controller_fan.py index 05897e3b..414be8de 100644 --- a/klippy/extras/controller_fan.py +++ b/klippy/extras/controller_fan.py @@ -49,5 +49,5 @@ class ControllerFan: self.fan.set_speed(print_time, power) return eventtime + 1. -def load_config(config): +def load_config_prefix(config): return ControllerFan(config) diff --git a/test/klippy/temperature.cfg b/test/klippy/temperature.cfg index a1e28541..4a81a08c 100644 --- a/test/klippy/temperature.cfg +++ b/test/klippy/temperature.cfg @@ -129,6 +129,9 @@ resistance3: 3000 sensor_type: my_custom_resistance_adc sensor_pin: analog5 +[controller_fan test_controller_fan] +pin: ar17 + [mcu] serial: /dev/ttyACM0 pin_map: arduino |