mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-11-02 03:16:02 +01: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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user