Merge remote-tracking branch 'Ultimaker/master'

This commit is contained in:
PCDotFan 2017-06-28 18:32:14 +08:00
commit 57503439dd
6 changed files with 12 additions and 3 deletions

View File

@ -677,7 +677,7 @@ class BuildVolume(SceneNode):
for extruder in used_extruders:
prime_blob_enabled = extruder.getProperty("prime_blob_enable", "value")
prime_x = extruder.getProperty("extruder_prime_pos_x", "value")
prime_y = - extruder.getProperty("extruder_prime_pos_y", "value")
prime_y = -extruder.getProperty("extruder_prime_pos_y", "value")
#Ignore extruder prime position if it is not set or if blob is disabled
if (prime_x == 0 and prime_y == 0) or not prime_blob_enabled:
@ -727,7 +727,7 @@ class BuildVolume(SceneNode):
offset_x = extruder.getProperty("machine_nozzle_offset_x", "value")
if offset_x is None:
offset_x = 0
offset_y = extruder.getProperty("machine_nozzle_offset_y", "value")
offset_y = -extruder.getProperty("machine_nozzle_offset_y", "value")
if offset_y is None:
offset_y = 0
result[extruder_id] = []
@ -746,7 +746,7 @@ class BuildVolume(SceneNode):
#The build volume is defined as the union of the area that all extruders can reach, so we need to know the relative offset to all extruders.
for other_extruder in ExtruderManager.getInstance().getActiveExtruderStacks():
other_offset_x = other_extruder.getProperty("machine_nozzle_offset_x", "value")
other_offset_y = other_extruder.getProperty("machine_nozzle_offset_y", "value")
other_offset_y = -other_extruder.getProperty("machine_nozzle_offset_y", "value")
left_unreachable_border = min(left_unreachable_border, other_offset_x - offset_x)
right_unreachable_border = max(right_unreachable_border, other_offset_x - offset_x)
top_unreachable_border = min(top_unreachable_border, other_offset_y - offset_y)

View File

@ -188,9 +188,18 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
else:
self._updatePrinterType("unknown")
Application.getInstance().getOutputDeviceManager().outputDevicesChanged.connect(self._onOutputDevicesChanged)
def _onNetworkAccesibleChanged(self, accessible):
Logger.log("d", "Network accessible state changed to: %s", accessible)
## Triggered when the output device manager changes devices.
#
# This is how we can detect that our device is no longer active now.
def _onOutputDevicesChanged(self):
if self.getId() not in Application.getInstance().getOutputDeviceManager().getOutputDeviceIds():
self.stopCamera()
def _onAuthenticationTimer(self):
self._authentication_counter += 1
self._authentication_requested_message.setProgress(self._authentication_counter / self._max_authentication_counter * 100)