w
This commit is contained in:
@@ -31,6 +31,7 @@ class PandaBoxOMNY(PandaBox):
|
||||
|
||||
def on_complete(self):
|
||||
"""On complete is called after the scan is complete. We need to wait for the capture to complete before we can disarm the PandaBox."""
|
||||
status = super().on_complete()
|
||||
|
||||
def _check_capture_complete():
|
||||
captured = 0
|
||||
@@ -56,6 +57,9 @@ class PandaBoxOMNY(PandaBox):
|
||||
|
||||
_check_capture_complete()
|
||||
|
||||
if status is not None:
|
||||
status.wait(timeout=self._timeout_on_completed)
|
||||
|
||||
# NOTE: This utility class allows to submit a blocking function to a thread and return a status object
|
||||
# that can be awaited for. This allows for asynchronous waiting for the capture to complete without blocking
|
||||
# the main duty cycle of the device server. The device server knows how to handle the status object (future)
|
||||
|
||||
Reference in New Issue
Block a user