示例#1
0
def insert_board(slot_num):
    try:
        pos = lzamp.switch_pos(slot_num)
        serNum = input(
            ("Insert Board in slot # {:d}, with swith in position " + pos +
             "\nOnce inserted, enter serial number: ").format(slot_num))
        tmp = lzamp.set_serNum(slot_num, serNum)
        sleep(1)
        tmp = lzamp.get_serNum(slot_num)
        if tmp == serNum:
            return (serNum)
        else:
            return (-1)
    except:
        return (-2)
示例#2
0
    if check_input_yn(
        ('\nCheck same channels again. ' +
         '\nIs test pulse visible on channel 1, but not 2 for all slots? (y/n) '
         )):
        print('fatal error, exiting.')
        event.set()
        t.join()
        exit()

    lzamp.power_off()
    sleep(1)
    tmp = raw_input('Remove and reinsert all AMP boards, then press enter.\n')

    print("Checking serial nums")
    for slot in range(1, 5):
        tmp = lzamp.get_serNum(slot)
        if not (tmp == serNums[slot - 1]):
            print('fatal error, serial numbers not perserved, exiting.')
            event.set()
            t.join()
            exit()
    print('good\n')

    print("Checking current")
    if (lzamp.get_current_neg() > 1) | (lzamp.get_current_pos() > 1):
        print('fatal error, power not off. exiting.')
        event.set()
        t.join()
        exit()
    print('good\n')