Added a printerOutputController to send commands to remote.

The idea is that this class can be subclassed. CL-541
This commit is contained in:
Jaime van Kessel 2017-11-17 16:25:44 +01:00
parent 700f7179f1
commit 3a8eef9768
4 changed files with 71 additions and 21 deletions

View file

@ -49,7 +49,7 @@ class ExtruderOutputModel(QObject):
## Set the target hotend temperature. This ensures that it's actually sent to the remote.
@pyqtSlot(int)
def setTargetHotendTemperature(self, temperature: int):
self._setTargetHotendTemperature(temperature)
self._printer.getController().setTargetHotendTemperature(self._printer, self, temperature)
self.updateTargetHotendTemperature(temperature)
@pyqtProperty(int, notify = targetHotendTemperatureChanged)
@ -60,12 +60,6 @@ class ExtruderOutputModel(QObject):
def hotendTemperature(self) -> int:
return self._hotendTemperature
## Protected setter for the hotend temperature of the connected printer (if any).
# /parameter temperature Temperature hotend needs to go to (in deg celsius)
# /sa setTargetHotendTemperature
def _setTargetHotendTemperature(self, temperature):
Logger.log("w", "_setTargetHotendTemperature is not implemented by this model")
@pyqtProperty(str, notify = hotendIDChanged)
def hotendID(self) -> str:
return self._hotend_id