def __init__(self, host='192.168.1.1'):
self.host = host
self.sequence = 1
self.timer = 0.2
self.com_watchdog_timer = threading.Timer(self.timer, self.commwdg)
self.lock = threading.Lock()
self.speed = 0.2
self.at(ardrone.at.config, 'general:navdata_demo', 'TRUE')
self.at(ardrone.at.config, 'control:altitude_max', '20000')
self.video_pipe, video_pipe_other = multiprocessing.Pipe()
self.nav_pipe, nav_pipe_other = multiprocessing.Pipe()
self.com_pipe, com_pipe_other = multiprocessing.Pipe()
self.network_process = ardrone.network.ARDroneNetworkProcess(self.host, nav_pipe_other, video_pipe_other, com_pipe_other)
self.network_process.start()
self.ipc_thread = ardrone.network.IPCThread(self)
self.ipc_thread.start()
self.image = PIL.Image.new('RGB', (640, 360))
self.navdata = dict()
self.time = 0
评论列表
文章目录