diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-07-12 22:26:32 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-07-12 22:26:32 -0400 |
commit | 7d897d84d773654a8beaf56012e0bf8285db8206 (patch) | |
tree | bf6a9d6116e7b6e5905126e166a4cd3a3e967635 /klippy/heater.py | |
parent | 5cdba1fda88cedfa1226ddeedef09a0df9a5e53f (diff) | |
download | kutter-7d897d84d773654a8beaf56012e0bf8285db8206.tar.gz kutter-7d897d84d773654a8beaf56012e0bf8285db8206.tar.xz kutter-7d897d84d773654a8beaf56012e0bf8285db8206.zip |
klippy: No need to pass printer reference to add_printer_objects()
The config reference already stores a reference to the printer object.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r-- | klippy/heater.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/heater.py b/klippy/heater.py index 7bbe4a82..919e1088 100644 --- a/klippy/heater.py +++ b/klippy/heater.py @@ -216,8 +216,8 @@ class ControlPID: ###################################################################### class PrinterHeaters: - def __init__(self, printer, config): - self.printer = printer + def __init__(self, config): + self.printer = config.get_printer() self.sensors = {} self.heaters = {} def add_sensor(self, sensor_type, sensor_factory): @@ -249,5 +249,5 @@ class PrinterHeaters: sensor_type,)) return self.sensors[sensor_type](config) -def add_printer_objects(printer, config): - printer.add_object('heater', PrinterHeaters(printer, config)) +def add_printer_objects(config): + config.get_printer().add_object('heater', PrinterHeaters(config)) |