Log device errors on init
This commit is contained in:
parent
ea49062d80
commit
81641272ee
@ -27,7 +27,10 @@ class DC2200(LedControlDevice):
|
|||||||
# turn off
|
# turn off
|
||||||
self.instr.write(f'SOURCE1:CBRightness:BRIGhtness 0')
|
self.instr.write(f'SOURCE1:CBRightness:BRIGhtness 0')
|
||||||
self.instr.write('OUTPUT1:STATE ON')
|
self.instr.write('OUTPUT1:STATE ON')
|
||||||
|
for _ in range(10): # print max 10 errors
|
||||||
|
error = self.instr.query('SYSTem:ERRor?')
|
||||||
|
if error.startswith('+0'): break
|
||||||
|
log.error(f"DC2200 device error during initialization: {error}")
|
||||||
def on(self):
|
def on(self):
|
||||||
self.instr.write(f'SOURCE1:CBRightness:BRIGhtness 100')
|
self.instr.write(f'SOURCE1:CBRightness:BRIGhtness 100')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user