mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-09-26 23:09:28 +08:00
fix: ensure serial is closed when thread crashed
This commit is contained in:
parent
ca56222445
commit
4def965759
@ -56,9 +56,11 @@ class Camera:
|
||||
self.buffer = b''
|
||||
|
||||
self.error_message = "\033[93m[WARN] Capture source {} not found, retrying...\033[0m"
|
||||
|
||||
def __del__(self):
|
||||
if self.serial_connection is not None:
|
||||
self.serial_connection.close()
|
||||
|
||||
def set_output_queue(self, camera_output_outgoing: "queue.Queue"):
|
||||
self.camera_output_outgoing = camera_output_outgoing
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user