Allow printer output devices to set their ability to update firmware

This commit is contained in:
fieldOfView 2018-08-22 14:37:48 +02:00
parent c1d7ca7bff
commit 4bea1410b8
5 changed files with 40 additions and 17 deletions

View file

@ -2,6 +2,7 @@
# Cura is released under the terms of the LGPLv3 or higher.
from UM.Logger import Logger
from UM.Signal import Signal
MYPY = False
if MYPY:
@ -56,3 +57,9 @@ class PrinterOutputController:
def sendRawCommand(self, printer: "PrinterOutputModel", command: str):
Logger.log("w", "Custom command not implemented in controller")
canUpdateFirmwareChanged = Signal()
def setCanUpdateFirmware(self, can_update_firmware: bool):
if can_update_firmware != self.can_update_firmware:
self.can_update_firmware = can_update_firmware
self.canUpdateFirmwareChanged.emit()