Merge branch 'maintenance' into devel
This commit is contained in:
commit
38ae0c9ac5
4 files changed
+24
-12
No files matched your search
@@ -71,7 +71,7 @@ core_deps = [
|
||||
"websocket-client>=1.5.1,<2",
|
||||
"werkzeug>=2.2.3,<2.3", # breaking changes can happen on minor version increases
|
||||
"wrapt>=1.15,<1.16",
|
||||
"zeroconf==0.39.4", # final version to include universal wheel, later takes ages to compiles on rpi, piwheels has no wheels for latest either
|
||||
"zeroconf~=0.127", # breaking changes can happen on minor version increases (despite semantic versioning)
|
||||
"zipstream-ng>=1.5.0,<2.0.0",
|
||||
]
|
||||
vendored_deps = [
|
||||
|
||||
@@ -703,12 +703,13 @@ class DiscoveryPlugin(
|
||||
sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
|
||||
sock.bind(("", self.__class__.ssdp_multicast_port))
|
||||
|
||||
sock.setsockopt(
|
||||
socket.IPPROTO_IP,
|
||||
socket.IP_ADD_MEMBERSHIP,
|
||||
socket.inet_aton(self.__class__.ssdp_multicast_addr)
|
||||
+ socket.inet_aton("0.0.0.0"),
|
||||
)
|
||||
for address in self.get_interface_addresses():
|
||||
sock.setsockopt(
|
||||
socket.IPPROTO_IP,
|
||||
socket.IP_ADD_MEMBERSHIP,
|
||||
socket.inet_aton(self.__class__.ssdp_multicast_addr)
|
||||
+ socket.inet_aton(address),
|
||||
)
|
||||
|
||||
self._logger.info(f"Registered {self.get_instance_name()} for SSDP")
|
||||
|
||||
|
||||
@@ -345,7 +345,14 @@ class VirtualPrinter:
|
||||
pass
|
||||
|
||||
def _processIncoming(self):
|
||||
next_wait_timeout = time.monotonic() + self._waitInterval
|
||||
next_wait_timeout = 0
|
||||
|
||||
def recalculate_next_wait_timeout():
|
||||
nonlocal next_wait_timeout
|
||||
next_wait_timeout = time.monotonic() + self._waitInterval
|
||||
|
||||
recalculate_next_wait_timeout()
|
||||
|
||||
buf = b""
|
||||
while self.incoming is not None and not self._killed:
|
||||
self._simulateTemps()
|
||||
@@ -361,7 +368,7 @@ class VirtualPrinter:
|
||||
except queue.Empty:
|
||||
if self._sendWait and time.monotonic() > next_wait_timeout:
|
||||
self._send("wait")
|
||||
next_wait_timeout = time.monotonic() + self._waitInterval
|
||||
recalculate_next_wait_timeout()
|
||||
continue
|
||||
except Exception:
|
||||
if self.incoming is None:
|
||||
@@ -377,7 +384,7 @@ class VirtualPrinter:
|
||||
else:
|
||||
continue
|
||||
|
||||
next_wait_timeout = time.monotonic() + self._waitInterval
|
||||
recalculate_next_wait_timeout()
|
||||
|
||||
if data is None:
|
||||
continue
|
||||
@@ -527,6 +534,10 @@ class VirtualPrinter:
|
||||
continue
|
||||
|
||||
finally:
|
||||
# recalculate the timeout again, as we might have just run a long
|
||||
# running command
|
||||
recalculate_next_wait_timeout()
|
||||
|
||||
# make sure that the debug sleepAfter and sleepAfterNext stuff works even
|
||||
# if we continued above
|
||||
if len(self._sleepAfter) or len(self._sleepAfterNext):
|
||||
|
||||
@@ -120,12 +120,12 @@
|
||||
<button class="btn btn-block control-box" data-bind="enable: isOperational() && !isPrinting(), click: function() { $root.sendRetractCommand() }">{{ _('Retract') }}</button>
|
||||
<div data-bind="style: { visibility: tools().length > 1 ? 'visible' : 'hidden' }">
|
||||
<div class="btn-group control-box" style="display: inline-block">
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown" data-bind="enable: isOperational() && !isPrinting() && !isPaused()">
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown" data-bind="enable: isOperational()">
|
||||
{{ _('Switch Tool...') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" data-bind="foreach: tools">
|
||||
<li><a href="#" data-bind="click: $root.sendSelectToolCommand, text: name(), enable: $root.isOperational() && !$root.isPrinting() && !$root.isPaused()"></a></li>
|
||||
<li><a href="javascript:void(0)" data-bind="click: $root.sendSelectToolCommand, text: name(), enable: $root.isOperational()"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="text-info" style="display: inline-block; height: 30px; vertical-align: middle" href="javascript:void(0)" data-bind="popover: {placement: 'top', trigger: 'hover', title: '{{ _('Please note!') }}', content: '{{ _('The selected tool can only be set, it cannot be read back from the firmware due to a limitation of the communication protocol. There is no way to show the current setting.') }}'}"><i class="fas fa-info-circle"></i></a>
|
||||
|
||||
Reference in new issue
Block a user