mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-29 17:45:45 +08:00
printer firmware version is major and minor in case of makerbot
CURA-11138
This commit is contained in:
parent
37e236405a
commit
3dd4ef7dda
@ -58,6 +58,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||||||
|
|
||||||
# The minimum version of firmware that support print job actions over cloud.
|
# The minimum version of firmware that support print job actions over cloud.
|
||||||
PRINT_JOB_ACTIONS_MIN_VERSION = Version("5.2.12")
|
PRINT_JOB_ACTIONS_MIN_VERSION = Version("5.2.12")
|
||||||
|
PRINT_JOB_ACTIONS_MIN_VERSION_METHOD = Version("2.500")
|
||||||
|
|
||||||
# Notify can only use signals that are defined by the class that they are in, not inherited ones.
|
# Notify can only use signals that are defined by the class that they are in, not inherited ones.
|
||||||
# Therefore, we create a private signal used to trigger the printersChanged signal.
|
# Therefore, we create a private signal used to trigger the printersChanged signal.
|
||||||
@ -325,8 +326,13 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
|
|||||||
if not self._printers:
|
if not self._printers:
|
||||||
return False
|
return False
|
||||||
version_number = self.printers[0].firmwareVersion.split(".")
|
version_number = self.printers[0].firmwareVersion.split(".")
|
||||||
firmware_version = Version([version_number[0], version_number[1], version_number[2]])
|
if len(version_number)> 2:
|
||||||
return firmware_version >= self.PRINT_JOB_ACTIONS_MIN_VERSION
|
firmware_version = Version([version_number[0], version_number[1], version_number[2]])
|
||||||
|
return firmware_version >= self.PRINT_JOB_ACTIONS_MIN_VERSION
|
||||||
|
else:
|
||||||
|
firmware_version = Version([version_number[0], version_number[1]])
|
||||||
|
return firmware_version >= self.PRINT_JOB_ACTIONS_MIN_VERSION_METHOD
|
||||||
|
|
||||||
|
|
||||||
@pyqtProperty(bool, constant = True)
|
@pyqtProperty(bool, constant = True)
|
||||||
def supportsPrintJobQueue(self) -> bool:
|
def supportsPrintJobQueue(self) -> bool:
|
||||||
|
@ -106,6 +106,10 @@ class MeshFormatHandler:
|
|||||||
if "application/x-ufp" not in machine_file_formats and Version(firmware_version) >= Version("4.4"):
|
if "application/x-ufp" not in machine_file_formats and Version(firmware_version) >= Version("4.4"):
|
||||||
machine_file_formats = ["application/x-ufp"] + machine_file_formats
|
machine_file_formats = ["application/x-ufp"] + machine_file_formats
|
||||||
|
|
||||||
|
# Exception for makerbot firmware version >=2.500: makerbot is supported
|
||||||
|
elif "application/x-makerbot" not in machine_file_formats:
|
||||||
|
machine_file_formats = ["application/x-makerbot"] + machine_file_formats
|
||||||
|
|
||||||
# Take the intersection between file_formats and machine_file_formats.
|
# Take the intersection between file_formats and machine_file_formats.
|
||||||
format_by_mimetype = {f["mime_type"]: f for f in file_formats}
|
format_by_mimetype = {f["mime_type"]: f for f in file_formats}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user