From c44cfac3af077adbded2add25467272d5ee41295 Mon Sep 17 00:00:00 2001 From: CPD Date: Wed, 12 Mar 2025 16:44:24 +0100 Subject: [PATCH] Revert "Add get_led_name method" This reverts commit ea49062d80ea30ec96498fc1e5a9f744b49008d1. --- cpdctrl/led_control_device/base.py | 3 --- cpdctrl/led_control_device/impl/thorlabs_dc2200.py | 10 +++------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cpdctrl/led_control_device/base.py b/cpdctrl/led_control_device/base.py index a33f777..85043ef 100644 --- a/cpdctrl/led_control_device/base.py +++ b/cpdctrl/led_control_device/base.py @@ -44,9 +44,6 @@ class LedControlDevice(ABC): """ pass - def get_led_name(self) -> None|str: - return None - @abstractmethod def __str__(self): pass \ No newline at end of file diff --git a/cpdctrl/led_control_device/impl/thorlabs_dc2200.py b/cpdctrl/led_control_device/impl/thorlabs_dc2200.py index dd0b249..27c943f 100644 --- a/cpdctrl/led_control_device/impl/thorlabs_dc2200.py +++ b/cpdctrl/led_control_device/impl/thorlabs_dc2200.py @@ -16,12 +16,11 @@ class DC2200(LedControlDevice): def __init__(self, instr: pyvisa.Resource): super().__init__() self.instr = instr - # led presence test - self.instr.write('OUTPut:TERMinal2:TEST:INITiate') - presence = self.instr.query('OUTPut:TERMinal2:TEST:STATus?') # Led name, format: # ",, < led_head_serial_no_string >, < fw_version_major_num >, < fw_version_minor_num >, < fw_version_subminor_num > " - self.led_name = self.instr.query('SYSTem:TERMinal2:HTYPe?') + self.name = instr.query('SYSTem:TERMinal2:HTYPe?') + # led presence test + self.instr.write('OUTPut[1]:TERMinal2:TEST:INITiate') # constant brightness self.instr.write('SOURCE1:MODE CB') # turn off @@ -47,8 +46,5 @@ class DC2200(LedControlDevice): instr = rm.open_resource(name) return DC2200(instr) - def get_led_name(self) -> None|str: - return self.led_name - def __str__(self): return "Thorlabs DC2200"