aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/gcode.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-11-07 16:24:52 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-11-07 16:28:47 -0500
commited610a6600dd982623ad79409f430a522910b202 (patch)
tree29207210d1100428a8ca1aea803eb15c23514132 /klippy/gcode.py
parent29b5961d9f6b3a24e73ed4d52233f463f8670619 (diff)
downloadkutter-ed610a6600dd982623ad79409f430a522910b202.tar.gz
kutter-ed610a6600dd982623ad79409f430a522910b202.tar.xz
kutter-ed610a6600dd982623ad79409f430a522910b202.zip
extruder: Consistently use "extruder" for the primary extruder
No longer allow the primary extruder to be named "extruder0". This avoids internal and external confusion between the printer objects and config section names. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r--klippy/gcode.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index ca13279d..ab5cc012 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -404,7 +404,10 @@ class GCodeParser:
heater = self.printer.lookup_object('heater_bed', None)
elif 'T' in params:
index = self.get_int('T', params, minval=0)
- extruder = self.printer.lookup_object('extruder%d' % (index,), None)
+ section = 'extruder'
+ if index:
+ section = 'extruder%d' % (index,)
+ extruder = self.printer.lookup_object(section, None)
if extruder is not None:
heater = extruder.get_heater()
elif self.extruder is not None: