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:
Kevin O'Connor
2019-11-07 16:24:52 -05:00
parent 29b5961d9f
commit ed610a6600
8 changed files with 48 additions and 41 deletions

View File

@@ -243,8 +243,6 @@ class PrinterHeaters:
self.sensor_factories[sensor_type] = sensor_factory
def setup_heater(self, config, gcode_id=None):
heater_name = config.get_name().split()[-1]
if heater_name == 'extruder':
heater_name = 'extruder0'
if heater_name in self.heaters:
raise config.error("Heater %s already registered" % (heater_name,))
# Setup sensor
@@ -254,8 +252,6 @@ class PrinterHeaters:
self.register_sensor(config, heater, gcode_id)
return heater
def lookup_heater(self, heater_name):
if heater_name == 'extruder':
heater_name = 'extruder0'
if heater_name not in self.heaters:
raise self.printer.config_error(
"Unknown heater '%s'" % (heater_name,))