示例#1
0
def power_cycle(down_time=4):
    '''cycle power to test boards and servos'''
    ser_dev = logger.get_ftdi()
    logger.info("power cycling")
    ser_dev.setRTS(1)
    time.sleep(down_time)
    ser_dev.setRTS(0)
示例#2
0
def power_cycle(down_time=4):
    '''cycle power to test boards and servos'''
    ser_dev = logger.get_ftdi()
    logger.info("power cycling")
    ser_dev.setRTS(1)
    time.sleep(down_time)
    ser_dev.setRTS(0)
示例#3
0
def power_cycle(down_time=4):
    if ETE == 0:
        '''cycle power to test boards and servos'''
        ser_dev = logger.get_ftdi()
        logger.info("power cycling")
        ser_dev.setRTS(1)
        time.sleep(down_time)
        ser_dev.setRTS(0)
    elif ETE == 1:
        ete = PixETE()
        logger.info("ETE power cycling")
        ete.command_bytes('power_cycle')
        time.sleep(down_time)
示例#4
0
def power_cycle(down_time=4):
    if ETE == 0:
        '''cycle power to test boards and servos'''
        ser_dev = logger.get_ftdi()
        logger.info("power cycling")
        ser_dev.setRTS(1)
        time.sleep(down_time)
        ser_dev.setRTS(0)
    elif ETE == 1:
        ete = PixETE()
        logger.info("ETE power cycling")
        ete.command_bytes('power_cycle')
        time.sleep(down_time)
示例#5
0
def on():
    ser_dev = logger.get_ftdi()
    ser_dev.setRTS(0)
示例#6
0
    # all OK
    colour_text.print_green('''
================================================
| Device: %s
| PASSED: Factory install complete (%u seconds)
================================================
''' %  (device_barcode, (time.time() - start_time)))
    logger.info("Factory install complete (%u seconds)" % (time.time() - start_time))
    return True

# load the jig state file
savedstate.init()
savedstate.reset('current_cycles')

while True:
    logger.get_ftdi()
    jigstate = savedstate.get()
    logger.info("jigstate: total_cycles = %i" % jigstate['total_cycles'])
    logger.info("jigstate: current_cycles = %i" % jigstate['current_cycles'])

    util.kill_processes(['mavproxy.py', GDB])

    if args.test:
        # power cycle each time, simulating new board put in
        power_control.power_cycle()
    else:
        # wait for the power to be switched off, disable serial logging
        logger.info("waiting for power off")
        util.wait_no_device([FMU_JTAG, IO_JTAG], timeout=600)

    device_barcode = args.barcode
示例#7
0
def on():
    ser_dev = logger.get_ftdi()
    ser_dev.setRTS(0)
示例#8
0
                (time.time() - start_time))
    ete.command_bytes('test_pass')
    ete.position(0, 0)
    ete.command_bytes('reset')
    ete.accel(100000)
    ete.yawspeed(5000)
    ete.rollspeed(10000)
    return True


# load the jig state file
savedstate.init()
savedstate.reset('current_cycles')

while True:
    logger.get_ftdi()
    jigstate = savedstate.get()
    logger.info("jigstate: total_cycles = %i" % jigstate['total_cycles'])
    logger.info("jigstate: current_cycles = %i" % jigstate['current_cycles'])
    # Set ETE speeds
    if ETE == 1:
        ete = PixETE()
        ete.yawspeed(5000)
        ete.rollspeed(10000)

    util.kill_processes(['mavproxy.py', GDB])

    if args.test:
        # power cycle each time, simulating new board put in
        power_control.power_cycle()
    else: