diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-07-10 12:23:35 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-07-10 22:49:02 -0400 |
commit | af99ab164543bc5e1ee68ef35b1b6f42f06ca887 (patch) | |
tree | eff2482eb95523d99dd57e82fc1e767baf36c267 /klippy/gcode.py | |
parent | 4a527a46cedaa4a7932ba5c1080b7133c69602cd (diff) | |
download | kutter-af99ab164543bc5e1ee68ef35b1b6f42f06ca887.tar.gz kutter-af99ab164543bc5e1ee68ef35b1b6f42f06ca887.tar.xz kutter-af99ab164543bc5e1ee68ef35b1b6f42f06ca887.zip |
extruder: Create a new class and python file to track the printer extruder
Create a new python file (extruder.py) to control the extruder heater
and stepper motors. This separates the extruder control logic from
the cartesian robot code - making it easier to customize both the
kinematic control of the robot as well as the extruder.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r-- | klippy/gcode.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py index 3ebd1afa..2958c76c 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -35,7 +35,10 @@ class GCodeParser: self.axis2pos = {'X': 0, 'Y': 1, 'Z': 2, 'E': 3} def build_config(self): self.toolhead = self.printer.objects['toolhead'] - self.heater_nozzle = self.printer.objects.get('heater_nozzle') + self.heater_nozzle = None + extruder = self.printer.objects.get('extruder') + if extruder: + self.heater_nozzle = extruder.heater self.heater_bed = self.printer.objects.get('heater_bed') self.fan = self.printer.objects.get('fan') self.build_handlers() |