Filter out configurations for empty materials

This commit is contained in:
ChrisTerBeke 2019-09-03 21:21:06 +02:00
parent e2ed6f03e2
commit 86d87acd5b
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263
2 changed files with 8 additions and 2 deletions

View file

@ -115,7 +115,8 @@ class ClusterPrinterStatus(BaseModel):
# We filter out any slot that is not supported by the extruder index, print core type or if the material is empty.
@staticmethod
def _isSupportedConfiguration(slot: ClusterPrinterMaterialStationSlot, extruder_index: int) -> bool:
return slot.extruder_index == extruder_index and slot.compatible
print("_isSupportedConfiguration", slot.material_empty)
return slot.extruder_index == extruder_index and slot.compatible and not slot.material_empty
## Create an empty material slot with a fake empty material.
@staticmethod