twissmueller
lvl.4
Flight distance : 55797 ft
Germany
Offline
|
I am writing an application in Swift for iPhone to control my Tello drone. I can connect to it and send payloads like "command", "takeoff" and so on.
But I am having trouble understanding how to properly disconnect from the Tello when I close my application. Here is the process:
When turning on the Tello and after it has booted up, the status LED is blinking yellow.
Then I establish a UDP-connection with Apples Network Framework which I have explained on my blog.
After the UDP-connection has been established I am sending the "command"-payload to the Tello and the yellow blinking LED is turning constantly green.
When I close my app though, I want the Tello to return to a blinking yellow state, but I have not found a way on how to do that. In my case the LED stays green and then turns red because nothing is being send to the Tello any more. After a while the UDP-connection fails and I cannot reestablish a proper connection when starting my application. I have to turn the Tello off and then on agian which I do not want.
I want to be able to properly disconnect from the Tello so I can then connect again if necessary without having to restart my Tello.
It is possible though, because that is how the official Tello application is actually behaving. When it is closed, the Tello LED turns from constant green to blinking yellow. When the Tello app is started again, the LED turns constant green again.
Any hints are highly appreciated. Thank you!
|
|