mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Added way to update the head position
CURA-1339
This commit is contained in:
parent
d33a75906a
commit
02e02a8f98
1 changed files with 16 additions and 0 deletions
|
@ -190,6 +190,22 @@ class PrinterOutputDevice(OutputDevice, QObject):
|
|||
def headZ(self):
|
||||
return self._head_z
|
||||
|
||||
## Update the saved position of the head
|
||||
# This function should be called when a new position for the head is recieved.
|
||||
def _updateHeadPosition(self, x, y ,z):
|
||||
position_changed = False
|
||||
if self._head_x != x:
|
||||
self._head_x = x
|
||||
position_changed = True
|
||||
if self._head_y != y:
|
||||
self._head_y = y
|
||||
position_changed = True
|
||||
if self._head_z != z:
|
||||
self._head_z = z
|
||||
position_changed = True
|
||||
if position_changed:
|
||||
self.headPositionChanged.emit()
|
||||
|
||||
## Set the position of the head.
|
||||
# In some machines it's actually the bed that moves. For convenience sake we simply see it all as head movements.
|
||||
# This function is "final" (do not re-implement)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue