Skip to content

Instantly share code, notes, and snippets.

@cziem
Created October 21, 2019 10:56
Show Gist options
  • Save cziem/4715840461b0b0b74fed699bf0f97b9a to your computer and use it in GitHub Desktop.
Save cziem/4715840461b0b0b74fed699bf0f97b9a to your computer and use it in GitHub Desktop.
main script to get the drone up and running
from src.controller.services.delays import command_delays as delays
from src.controller.services.drone_services import Drone
from time import sleep
import sys
'''
'takeoff', 'land', 'time?', 'speed?',
'''
command_list = ['command', 'battery?']
command_len = len(command_list)
# Instantiate new Drone
tello = Drone('Tello', command_len)
for i in range(command_len):
command = command_list[i]
wait = delays[command]
tello.send_msg(command)
tello.stream_resp()
sleep(wait)
tello.close_sock()
if __name__ == '__main__':
print('We got called')
sys.stdout.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment