Ignore values of extruders that are inactive for the current machine instance

extrudervalues() would include the values of extruders whose position >= machine_extruder_count. This can happen in machine definitions that have more extruders than machine_extruder_count, eg Custom FDM printer.
This commit is contained in:
fieldOfView 2017-05-08 13:43:09 +02:00
parent 98b127851b
commit 3fbdaf6c17

View file

@ -520,6 +520,10 @@ class ExtruderManager(QObject):
result = [] result = []
for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):
# only include values from extruders that are "active" for the current machine instance
if int(extruder.getMetaDataEntry("position")) >= global_stack.getProperty("machine_extruder_count", "value"):
continue
value = extruder.getRawProperty(key, "value") value = extruder.getRawProperty(key, "value")
if value is None: if value is None: