Commit 479ed989 authored by vertighel's avatar vertighel
Browse files

Fix Atik connection: call ArtemisDeviceCount() fresh before ArtemisConnect



self.count was stale from __init__, skipping re-enumeration that the SDK
requires immediately before ArtemisConnect().

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent eadfec3b
Loading
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -64,9 +64,10 @@ class Camera(BaseDevice):
        """Internal method to manage the persistent camera handle."""

        if self._handle is None and self._lib:
            log.debug(f"SDK reported {self.count} devices.")
            count = self._lib.ArtemisDeviceCount()
            log.debug(f"SDK reported {count} devices.")

            if self.count > 0:
            if count > 0:
                self._handle = self._lib.ArtemisConnect(0)
                if self._handle:
                    self._lib.ArtemisProperties(self._handle, ctypes.byref(self._props))