Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

A Tello Library

Krag

Well-known member
Joined
Mar 22, 2018
Messages
252
Reaction score
201
I have been working on a C# library that wraps what we have learned about the API into something a little easier to use. It isn't as easy to use as say python. But the goal is to make it easier to develop apps for Android, PC and eventually iOS. It uses Xarmin for cross platform because I vastly prefer C# over Java and Objective C.

So far I have been focusing on getting it to reliably connect and reconnect under network conditions and making sure the basic commands and functions work. The API isn't complete. And the UI in the apps is very basic.

The github is here:
Kragrathea/TelloLib

There is the TelloLib, a Hello World example, an Android app and a PC Console app. Here is the example:
Code:
using TelloLib;

namespace HelloTello
{
    class Program
    {
        static void Main(string[] args)
        {
            //Subscribe to Tello connection events. Called when connected/disconnected.
            Tello.onConnection += (Tello.ConnectionState newState) =>
            {
                if (newState == Tello.ConnectionState.Connected)
                {
                    //When connected update maxHeight to 5 meters
                    Tello.setMaxHeight(5);
                }
                //Show connection messages.
                Console.WriteLine("Tello " + newState.ToString());
            };

            //subscribe to Tello update events. Called when update data arrives from drone.
            Tello.onUpdate += (Tello.FlyData newState) =>
            {
                Console.WriteLine("FlyMode:" + newState.flyMode +" Height:" + newState.height);
            };

            Tello.startConnecting();//Start trying to connect.

            //Parse commands from console and send to drone.
            var str = "";
            while (str != "exit")
            {
                str = Console.ReadLine().ToLower();
                if (str == "takeoff" && Tello.connected && !Tello.state.flying)
                    Tello.takeOff();
                if (str == "land" && Tello.connected && Tello.state.flying)
                    Tello.land();
            }
        }
    }
}

To build the app you "just" need the free Visual Studio Community Edition. I say just because it is a huge download. But once it is running you can build and deploy to an android phone.

Installing Xamarin in Visual Studio 2017 - Xamarin
 
This is awesome, great work Krag!

I'm much more familiar with c# and java than go, so I will definitely be using this if I can't get image tracking to work using the gobot version of OpenCV.
 
I finally got video working on Android. All the major systems now work and I'll start filling in the missing functionality.

aTello-Screenshot.png
 
  • Like
Reactions: tincdron and JamilG
Got onscreen joysticks working. Almost ready for release.
aTelloScreen5.png
 
Cool ?
Will it support a controller and if so which one?
Thanks,
Sam
 
There are a lot of users that ended up purchasing the Td1, therefore you may want to at least support this version!
 
I have one too. But Gamesir is not compatible with generic bluetooth and they keep the SDK proprietary. So no Gamesir support.
 
I’m sorry to hear that, but to be honest with you I would not go out and buy another controller just for the app. Sorry I just want to be honest with you!
 
I don't blame you. And the official Tello app has more features than this, so you won't lose out on much.

The major point of this app is so that people can use existing controllers and not get locked into Gamesir/Ryze's walled garden. I paid $6 for my PS3 controller and I can use it with other stuff than the Tello.
 
Fair enough and I sincerely wish you the best with the app and for thinking of those who are stuck with a non compatible controller. I’m sure that they will appreciate it!
 
Have you managed to figure out how to get values for the rest of the variables in the FlightData that we saw in the decompiled apk?

I've only been able to get height, battery percentage, and speed, with the rest of the values at 0.

Also, for the wifi - it always stays at 90? The wifi status I read from the drone is always 90 lol. I don't think thats correct...
 
I haven't really figured out anything new. Some values will probably only change when things go wrong, like wind. electricalMachineState changes as the drone tilts but I don't know what good it is.

Wifi strength does vary. It tends to go down fast as it gets far away.
 
Hello Krag,
As you connect the PS3 controller to the application Tello ?.
Is it with the Octopus APK ?.

Cheers.
 

New Posts

Members online

No members online now.

Forum statistics

Threads
5,690
Messages
39,934
Members
17,023
Latest member
Repiv

New Posts