aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/klippy.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-04-03 17:01:10 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-04-04 23:13:53 -0400
commitaed958eb5c32003c7ffcd10d8852082b6d896794 (patch)
tree8fed6212b4170da3fecefca103cbc70ffa4575ce /klippy/klippy.py
parent4eeb43b191e3d928cf817d3be0350711dc05526d (diff)
downloadkutter-aed958eb5c32003c7ffcd10d8852082b6d896794.tar.gz
kutter-aed958eb5c32003c7ffcd10d8852082b6d896794.tar.xz
kutter-aed958eb5c32003c7ffcd10d8852082b6d896794.zip
heater: Add PrinterHeaters class that stores all sensors and heaters
Add a PrinterHeaters class that can stores references to available temperature sensors and stores references to instantiated heaters. Add a extras/heater_bed.py file and delay instantiation of the heater_bed object. This allows the heater.py module to be imported earlier during the setup phase, and allows the PrinterHeaters class to be available for registering sensors and heaters. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r--klippy/klippy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py
index 77ab3cc0..9532b911 100644
--- a/klippy/klippy.py
+++ b/klippy/klippy.py
@@ -7,7 +7,7 @@
import sys, os, optparse, logging, time, threading
import collections, ConfigParser, importlib
import util, reactor, queuelogger, msgproto
-import gcode, pins, mcu, toolhead, extruder, heater
+import gcode, pins, heater, mcu, toolhead, extruder
message_ready = "Printer is ready"
@@ -204,11 +204,11 @@ class Printer:
ConfigLogger(fileconfig, self.bglogger)
# Create printer components
config = ConfigWrapper(self, fileconfig, 'printer')
- for m in [pins, mcu]:
+ for m in [pins, heater, mcu]:
m.add_printer_objects(self, config)
for section in fileconfig.sections():
self.try_load_module(config, section)
- for m in [toolhead, extruder, heater]:
+ for m in [toolhead, extruder]:
m.add_printer_objects(self, config)
# Validate that there are no undefined parameters in the config file
valid_sections = { s: 1 for s, o in self.all_config_options }