Comments (13)
have you manually updated swift nio? I remember I have specified the dependency version?
from telloswift.
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.10.0"),
],
this is what it depends. what's your version?
from telloswift.
from telloswift.
just launch Xcode, create a swift playground, and try import the framework and follow example code in README.
But, you may want to check out the original python SDK from Tello, if you are familiar with python.
I craeted this repo only because there is no Swift SDK and in case anyone wants to control their tello/EDU from their iOS/macOS apps.
from telloswift.
from telloswift.
I saw you are the man sending me email :) I tried replying, but gmail denied my email domain due to SPF not set. So you didn't get my email earilier.
The use is quite simple, if youo are familiar with OOP like swift, python, the Tello drone is an object:
simply create Tello object
let tello = Tello()
print("connected:", tello.activate())
print("battery:", tello.battery)
if tello.battery < 20 {
tello.shutdown()
print("battery too low")
}
print(tello.speed)
when you see the tello printed connected, you are ready to fly:
tello.takeoff()
tello.hover()
tello.land()
or even chaining multiple commands:
tello.chain("takeoff).chain("forward 20", failover: .hover).chain("land")
the Swift SDK simply send the commands via TCP to Tello.
I just wrap all the commands in swift and add some convenient methods so you can control your tello much easier, like chaining multiple commands, and providing fail over features like if you want to go 500m ahead but if the commands failed, you can chose one command as fail over method like hover() or land() to make sure there no danger would accur or evening hurting people / drone.
again, if you are not faimiliar with swift, I suggest not to take any risk using this SDK. you should start with python SDK or just follow some guides from Tello website to get yourself familiar with how to use SDK first.
This framework is pure SDK, not an app or script.
from telloswift.
also, if you didn't see connected, make sure you pass the right IP and port:
// MARK: Commander protocol
public var telloAddress = "192.168.10.1"
// Tello IP: 192.168.10.1 UDP PORT:8889 <<- ->> PC/Mac/Mobile
public var telloPort = 8889
// Tello IP: 192.168.10.1 ->> PC/Mac/Mobile UDP Server: 0.0.0.0 UDP PORT:8890
public var statePort = 8890
public var localAddr: String
public var localPort: Int
you will need manually specify them if not default values, like:
let tello = Tello(localAddr: your ip, localPort: your port number)
from telloswift.
again. You need to walk through the public APIs this framework provides, so you have a clear picture what API to use. There are plenty of covenient methods there.
from telloswift.
and btw...
I just found that I actually provided a demo app inside [TelloVideoDecoder(https://github.com/liuxuan30/TelloSwift/tree/master/TelloVideoDecoder)
there is a mac app so you give a try, with camera support.
from telloswift.
I have updated the project with latest Xcode and NIO versions. it builds on my side. So this issue is considered solved.
from telloswift.
from telloswift.
from telloswift.
hmm not really my expert area, I would suggest checking R^2 = X^2 + Y^2 to do the math?
from telloswift.
Related Issues (2)
- Video stream Data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telloswift.