style: project structure

This commit is contained in:
raiot 2024-06-30 15:50:11 +08:00
parent c468833a0b
commit c6ccdb7b59
1 changed files with 0 additions and 21 deletions

21
main.py
View File

@ -1,21 +0,0 @@
from djitellopy import Tello
import cv2
my_drone = Tello()
my_drone.connect()
print(my_drone.get_battery())
my_drone.streamon()
my_drone.set_video_direction(Tello.CAMERA_FORWARD)
while True:
# Read a frame from the video stream
img = my_drone.get_frame_read().frame
img = cv2.resize(img, (360, 240))
# Display the frame
cv2.imshow("Image", img)
# Check for key press to exit
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cv2.destroyAllWindows()
my_drone.streamoff()
# my_drone.land()