CPD 84fe8980d9 Revert "Added Thorlabs DC2200 support"
This reverts commit f69e3d8b727c37d9b556a036b7de606d566bfeaa.
2025-03-12 16:44:55 +01:00

25 lines
862 B
Python

from cpdctrl.led_control_device.base import LedControlDevice
from cpdctrl.led_control_device.impl.test import TestLedControlDevice
def list_devices() -> dict[str,list[str]]:
devices = {
"TEST": ["Led Control Dummy Device"],
}
try:
from .impl import thorlabs_ledd1b as th
devices["ARDUINO"] = ["Thorlabs LEDD1B"] #keithley2700.enumerate_devices()
except ImportError:
pass
return devices
def connect_device(typename: str, devicename: str) -> LedControlDevice:
if typename == "TEST":
return TestLedControlDevice()
elif typename == "ARDUINO":
try:
from .impl import thorlabs_ledd1b as th
return th.LEDD1B()
except ImportError as e:
raise ValueError(f"Arduino devices not available: {e}")
raise ValueError(f"Unknown device type {typename}")