mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 12:17:56 -06:00
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>
This commit is contained in:
parent
29b5961d9f
commit
ed610a6600
8 changed files with 48 additions and 41 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue