mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 16:57:55 -06:00
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>
This commit is contained in:
parent
4a527a46ce
commit
af99ab1645
8 changed files with 88 additions and 27 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue