damiafuentes / DJITelloPy

DJI Tello drone python interface using the official Tello SDK. Feel free to contribute!
MIT License
1.26k stars 493 forks source link

error unknown command #107

Closed WillDeveloped closed 3 years ago

WillDeveloped commented 3 years ago

I keep getting an error when I try to run:

drone = tello.Tello() drone.connect() drone.set_video_fps("Tello.FPS_30")

The error I get is an unknown command. I've updated the firmware on the drone to the most up to date.

WillDeveloped commented 3 years ago

Reading though the documentation, it looks like those command were introduced in sdk3.0. Since my drone doesn't understand them, I'm guessing it's still on sdk2. I'll pull the sdk version when I get home and see what's going on. Maybe the Tello app didn't update the firmware as indicated?

M4GNV5 commented 3 years ago

Your code is wrong. You have to call

drone.set_fps(tello.Tello.FPS_30)

or better directly import the Tello class:

from djitellopy import Tello

drone = Tello()
drone.connect()

drone.set_fps(Tello.FPS_30)