fix(camera): stop live mode before disconnecting to prevent polling
CI for csaxs_bec / test (push) Successful in 1m47s
CI for csaxs_bec / test (pull_request) Successful in 1m45s

This commit is contained in:
2026-09-08 10:10:52 +02:00
parent d3f7871855
commit eb4dfb9d59
4 changed files with 6 additions and 0 deletions
@@ -247,6 +247,8 @@ class AlliedVisionAravisCamera(PSIDeviceBase):
def on_destroy(self):
"""Clean up resources when the device is destroyed."""
# Stop acquisition before disconnecting so the live thread cannot keep polling.
self.stop_live_mode()
self.cam.on_disconnect()
super().on_destroy()
@@ -289,6 +289,8 @@ class IDSCamera(PSIDeviceBase):
def on_destroy(self):
"""Clean up resources when the device is destroyed."""
# Stop acquisition before disconnecting so the live thread cannot keep polling.
self.stop_live_mode()
self.cam.on_disconnect()
super().on_destroy()
@@ -23,6 +23,7 @@ def allied_vision_camera():
camera.cam.width = 2
camera.cam.height = 2
yield camera
camera.stop_live_mode()
def test_mask_setter_getter(allied_vision_camera):
+1
View File
@@ -28,6 +28,7 @@ def ids_camera():
camera.cam.cam.width.value = 2
camera.cam.cam.height.value = 2
yield camera
camera.stop_live_mode()
def test_mask_setter_getter(ids_camera):