w
All checks were successful
CI for csaxs_bec / test (push) Successful in 1m20s
CI for csaxs_bec / test (pull_request) Successful in 1m19s

This commit is contained in:
2026-02-10 11:04:56 +01:00
parent 2fe565957e
commit f231b50ddf

View File

@@ -47,18 +47,20 @@ class PandaBoxCSAXS(PandaBox):
finally:
self._disarm()
_check_capture_complete()
# 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)
# and will wait for it to complete.
status = self.task_handler.submit_task(_check_capture_complete, run=True)
# status = self.task_handler.submit_task(_check_capture_complete, run=True)
status_panda_state = StatusBase(obj=self)
self.add_status_callback(
status, success=[PandaState.END, PandaState.DISARMED], failure=[PandaState.READY]
)
ret_status = status & status_panda_state
self.cancel_on_stop(ret_status)
# status_panda_state = StatusBase(obj=self)
# self.add_status_callback(
# status, success=[PandaState.END, PandaState.DISARMED], failure=[PandaState.READY]
# )
# ret_status = status & status_panda_state
# self.cancel_on_stop(ret_status)
return ret_status