Turn off LED on end

This commit is contained in:
CPD 2025-03-13 15:17:09 +01:00
parent f858dd6916
commit 3b7a9ebc16
2 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,11 @@ class DC2200(LedControlDevice):
error = self.instr.query('SYSTem:ERRor?')
if error.startswith('+0'): break
log.error(f"DC2200 device error during initialization: {error}")
def __del__(self):
self.off()
self.instr.close()
def on(self):
self.instr.write(f'SOURCE1:CBRightness:BRIGhtness 100')

View File

@ -15,6 +15,7 @@ class LEDD1B(LedControlDevice):
# self._check_arduino_software()
def __del__(self):
self.off()
self.arduino.close()
def _check_arduino_software(self):