mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
parsing method printer nozzles
CURA-11138
This commit is contained in:
parent
39ec9c9279
commit
1a139f44bc
2 changed files with 17 additions and 1 deletions
|
@ -40,9 +40,22 @@ class ExtruderConfigurationModel(QObject):
|
|||
|
||||
def setHotendID(self, hotend_id: Optional[str]) -> None:
|
||||
if self._hotend_id != hotend_id:
|
||||
self._hotend_id = hotend_id
|
||||
self._hotend_id = ExtruderConfigurationModel.getHotendIdIfMakerbot(hotend_id)
|
||||
self.extruderConfigurationChanged.emit()
|
||||
|
||||
@staticmethod
|
||||
def getHotendIdIfMakerbot(hotendId) -> str:
|
||||
_EXTRUDER_NAME_MAP = {
|
||||
"mk14_hot":"1XA",
|
||||
"mk14_hot_s":"2XA",
|
||||
"mk14_c":"1C",
|
||||
"mk14":"1A",
|
||||
"mk14_s":"2A"
|
||||
}
|
||||
if hotendId in _EXTRUDER_NAME_MAP:
|
||||
return _EXTRUDER_NAME_MAP[hotendId]
|
||||
return hotendId
|
||||
|
||||
@pyqtProperty(str, fset = setHotendID, notify = extruderConfigurationChanged)
|
||||
def hotendID(self) -> Optional[str]:
|
||||
return self._hotend_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue