printertype Parsing function made static

CURA-11138
This commit is contained in:
saumya.jain 2023-10-30 14:31:17 +01:00
parent c2e2511fdc
commit 39ec9c9279
2 changed files with 5 additions and 12 deletions

View file

@ -415,9 +415,10 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice):
@pyqtProperty(str, constant = True)
def printerType(self) -> str:
return self.getPrinterTypeIfMakerBot(self._properties.get(b"printer_type", b"Unknown").decode("utf-8"))
return NetworkedPrinterOutputDevice.getPrinterTypeIfMakerBot(self._properties.get(b"printer_type", b"Unknown").decode("utf-8"))
def getPrinterTypeIfMakerBot(self, printer_type):
@staticmethod
def getPrinterTypeIfMakerBot(printer_type):
method_printer_type = {
"fire_e": "ultimaker_method",
"lava_f": "ultimaker_methodx",