heaters: Make heater.py an "extras" module

The heater logic is an independent module that does not need to be
treated as part of the "core" klipper code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-04-25 13:27:41 -04:00
parent d858498a53
commit 17123889f6
16 changed files with 50 additions and 45 deletions

View File

@@ -18,9 +18,9 @@ class PIDCalibrate:
heater_name = self.gcode.get_str('HEATER', params)
target = self.gcode.get_float('TARGET', params)
write_file = self.gcode.get_int('WRITE_FILE', params, 0)
pheater = self.printer.lookup_object('heater')
pheaters = self.printer.lookup_object('heaters')
try:
heater = pheater.lookup_heater(heater_name)
heater = pheaters.lookup_heater(heater_name)
except self.printer.config_error as e:
raise self.gcode.error(str(e))
self.printer.lookup_object('toolhead').get_last_move_time()
@@ -31,7 +31,7 @@ class PIDCalibrate:
except self.printer.command_error as e:
heater.set_control(old_control)
raise
pheater.wait_for_temperature(heater)
pheaters.wait_for_temperature(heater)
heater.set_control(old_control)
if write_file:
calibrate.write_file('/tmp/heattest.txt')