with open(BOOKKEEPER_path, "a+") as f: f.write(",".join([FLIGHTLOG_NAME.format(START), DEVICE_LOG.format(START), args.info])) f.write("\n") #v = log = None d = Device(args.name, START, args.solo_edge, args.adaptive_fr, args.adaptive_pipes, is_nano=args.tegra, model=models[int(args.model)], ismac=False, verbose=args.verbose, input_type =args.input, conn_string=args.c, db_host=args.db) #v = d.drone #print("Flight Log Start") #log = FlightLog(v, logtime=0.1, start_time=START) #log.start() try: #v.arm_and_takeoff(ALTITUDE[0]) d.start() while True: time.sleep(1) print("d.state[img_out_q]", d.state["img_out_q"]) print("Active pipelines", d.state["active_pipelines"]) except ValueError as e: raise e except KeyboardInterrupt as ki: pass except Exception as e: raise e finally: try: print("STOPPING") d.stop() log.flag("LAND")