heater: Support generic gcode_id registration for sensors
Support reading a "gcode_id" parameter from heater/sensor config sections. Signed-off-by: Douglas Hammond <wizhippo@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
committed by
Kevin O'Connor
parent
34209e6189
commit
3887ad4fce
@@ -4,13 +4,5 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
import logging
|
||||
|
||||
class PrinterHeaterGeneric:
|
||||
def __init__(self, config):
|
||||
self.printer = config.get_printer()
|
||||
gcode_id = config.get("gcode_id")
|
||||
self.heater = self.printer.lookup_object('heater').setup_heater(config, gcode_id)
|
||||
|
||||
def load_config_prefix(config):
|
||||
return PrinterHeaterGeneric(config)
|
||||
return config.get_printer().lookup_object('heater').setup_heater(config)
|
||||
|
||||
Reference in New Issue
Block a user