extruder: Add support for extruders sharing the same heater
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
6fa95e12ea
commit
09eec3710d
|
@ -13,6 +13,13 @@
|
||||||
#step_pin: ar36
|
#step_pin: ar36
|
||||||
#dir_pin: ar34
|
#dir_pin: ar34
|
||||||
#...
|
#...
|
||||||
|
#shared_heater:
|
||||||
|
# If this extruder uses the same heater already defined for another
|
||||||
|
# extruder then place the name of that extruder here. For example,
|
||||||
|
# should extruder3 and extruder4 share a heater then the extruder3
|
||||||
|
# config section should define the heater and the extruder4 section
|
||||||
|
# should specify "shared_heater: extruder3". The default is to not
|
||||||
|
# reuse an existing heater.
|
||||||
#deactivate_gcode:
|
#deactivate_gcode:
|
||||||
# A list of G-Code commands (one per line) to execute on a G-Code
|
# A list of G-Code commands (one per line) to execute on a G-Code
|
||||||
# tool change command (eg, "T1") that deactivates this extruder and
|
# tool change command (eg, "T1") that deactivates this extruder and
|
||||||
|
|
|
@ -10,7 +10,11 @@ EXTRUDE_DIFF_IGNORE = 1.02
|
||||||
|
|
||||||
class PrinterExtruder:
|
class PrinterExtruder:
|
||||||
def __init__(self, printer, config):
|
def __init__(self, printer, config):
|
||||||
|
shared_heater = config.get('shared_heater', None)
|
||||||
|
if shared_heater is None:
|
||||||
self.heater = heater.PrinterHeater(printer, config)
|
self.heater = heater.PrinterHeater(printer, config)
|
||||||
|
else:
|
||||||
|
self.heater = get_printer_heater(printer, shared_heater)
|
||||||
self.stepper = stepper.PrinterStepper(printer, config)
|
self.stepper = stepper.PrinterStepper(printer, config)
|
||||||
self.nozzle_diameter = config.getfloat('nozzle_diameter', above=0.)
|
self.nozzle_diameter = config.getfloat('nozzle_diameter', above=0.)
|
||||||
filament_diameter = config.getfloat(
|
filament_diameter = config.getfloat(
|
||||||
|
|
Loading…
Reference in New Issue