aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-29 13:57:02 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-06-09 18:54:34 -0400
commit136dccbcdfc6a20c8b6755afdfb65891cee3d1a7 (patch)
treefb195571d64d97f79c6197c9c46d02319d347356 /klippy/heater.py
parentd0e6a0928b483f29a3bcfd86d16192bef5652042 (diff)
downloadkutter-136dccbcdfc6a20c8b6755afdfb65891cee3d1a7.tar.gz
kutter-136dccbcdfc6a20c8b6755afdfb65891cee3d1a7.tar.xz
kutter-136dccbcdfc6a20c8b6755afdfb65891cee3d1a7.zip
klippy: Allow each module to define their config sections
Create add_printer_objects() functions in the fan, heater, extruder, and toolhead modules. Create the necessary printer component objects from this call instead of placing the code directly in klippy.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r--klippy/heater.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/klippy/heater.py b/klippy/heater.py
index c4e0a715..21624cb0 100644
--- a/klippy/heater.py
+++ b/klippy/heater.py
@@ -308,3 +308,8 @@ class ControlBumpTest:
return True
self.heater.control = self.old_control
return False
+
+def add_printer_objects(printer, config):
+ if config.has_section('heater_bed'):
+ printer.add_object('heater_bed', PrinterHeater(
+ printer, config.getsection('heater_bed')))