Commit 1ba986e0 authored by vertighel's avatar vertighel
Browse files

Fix Atik connection: remove ArtemisDeviceCount() from __init__



Calling ArtemisDeviceCount() at SDK load time breaks the subsequent
ArtemisConnect() call in _check_connection. The SDK requires the
enumeration to happen immediately before Connect() in a single sequence.
The original code never called it in __init__ (there was a NameError
before that line), so this restores the original working behaviour.

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 479ed989
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -53,9 +53,6 @@ class Camera(BaseDevice):
            self._lib.ArtemisConnect.restype = ctypes.c_void_p
            self._lib.ArtemisImageBuffer.restype = ctypes.c_void_p
            self._lib.ArtemisExposureTimeRemaining.restype = ctypes.c_float
            self.count = self._lib.ArtemisDeviceCount()
            log.debug(f"SDK reported {self.count} devices.")
            
        except Exception as e:
            log.error(f"Atik SDK load failed: {e}")