mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Function name changed to make it a bit generic
CURA-11138
This commit is contained in:
parent
1a139f44bc
commit
ce132e4c3f
3 changed files with 8 additions and 8 deletions
|
@ -415,17 +415,17 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
|||
|
||||
@pyqtProperty(str, constant = True)
|
||||
def printerType(self) -> str:
|
||||
return NetworkedPrinterOutputDevice.getPrinterTypeIfMakerBot(self._properties.get(b"printer_type", b"Unknown").decode("utf-8"))
|
||||
return NetworkedPrinterOutputDevice.applyPrinterTypeMapping(self._properties.get(b"printer_type", b"Unknown").decode("utf-8"))
|
||||
|
||||
@staticmethod
|
||||
def getPrinterTypeIfMakerBot(printer_type):
|
||||
method_printer_type = {
|
||||
def applyPrinterTypeMapping(printer_type):
|
||||
_PRINTER_TYPE_NAME = {
|
||||
"fire_e": "ultimaker_method",
|
||||
"lava_f": "ultimaker_methodx",
|
||||
"magma_10": "ultimaker_methodxl"
|
||||
}
|
||||
if printer_type in method_printer_type:
|
||||
return method_printer_type[printer_type]
|
||||
if printer_type in _PRINTER_TYPE_NAME:
|
||||
return _PRINTER_TYPE_NAME[printer_type]
|
||||
return printer_type
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue