Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
host=TELLO_IP,
retry_count=RETRY_COUNT):
global drones
self.address = (host, Tello.CONTROL_UDP_PORT)
self.stream_on = False
self.retry_count = retry_count
self.last_received_command_timestamp = time.time()
self.last_rc_control_timestamp = time.time()
if drones is None:
drones = {}
# Run Tello command responses UDP receiver on background
response_receiver_thread = threading.Thread(target=Tello.udp_response_receiver)
response_receiver_thread.daemon = True
response_receiver_thread.start()
# Run state UDP receiver on background
state_receiver_thread = threading.Thread(target=Tello.udp_state_receiver)
state_receiver_thread.daemon = True
state_receiver_thread.start()
drones[host] = {
'responses': [],
'state': {},
}