def channel_enabler(slot, ch): try: if (not globals()['board_%s_ch_%s_disable' % (slot, ch)].is_set()) & (get_channel_status( slot, ch) == 0): lzamp.set_channel_enable(slot, ch, 1) except (KeyboardInterrupt, SystemExit): raise except Exception: exception_traceback_log.exception('The following error occurred:') pass
if check_input_yn( '\nAre the red LEDs on the AMPs flashing in the correct order (1, 2, 3, 4)? (y/n) ' ): print('fatal error, exiting. AMPs were installed incorrectly.') event.set() t.join() exit() event.set() t.join() event.clear() print('\n\nTesting digital switch functionality\n') for slot in range(1, 5): for ch in range(1, 9): lzamp.set_channel_enable(slot, ch, 1) t = Thread(target=loop_test) t.start() sleep(1) if check_input_yn(('Use scope to probe channels 1 and 2 HG on all slots.' + 'Is test pulse visible on all channels? (y/n) ')): print('fatal error, exiting.') event.set() t.join() exit() for slot in range(1, 5): lzamp.set_channel_enable(slot, 2, 0) if check_input_yn( ('\nCheck same channels again. ' +
def set_board_enable(slot, en): for ch in range(8): lzamp.set_channel_enable(slot, ch + 1, en)