Skip to content

Commit 7f47763

Browse files
author
Shashank Date
committed
Added UDP example for mruby and a config folder
1 parent 081c80f commit 7f47763

9 files changed

+7
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ tello_gem/
55
/tmp/*
66
*.pdf
77
/videos/*.mp4
8+
/config/*.json

config/.keep

Whitespace-only changes.

fiber_tello.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class Tello
1919
def initialize(tello_ip)
2020
@fiber = nil
2121
@swarm = (tello_ip == FIXED_IP)
22-
@udps = UDPSocket.open
2322
@sockaddr = Socket.pack_sockaddr_in(COMMAND_PORT, tello_ip)
24-
port = RESPOND_PORT # +1+rand(500)
23+
port = RESPOND_PORT
24+
@udps = UDPSocket.open
2525
@udps.bind('0.0.0.0', port)
2626
end
2727

@@ -139,8 +139,8 @@ def sanitize(message)
139139
Tello.create(*ARGV) do |tello|
140140
## Do something
141141
tello.do('cw 90')
142-
tello.do('ccw 90')
143-
tello.do('flip l')
144-
tello.do('flip r')
142+
# tello.do('ccw 90')
143+
# tello.do('flip l')
144+
# tello.do('flip r')
145145
end
146146
end

hello_edu.rb

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11

2-
## Adapted from Python:
3-
# https://raw.githubusercontent.com/dbaldwin/DroneBlocks-TelloEDU-Python/master/swarm-box-mission.py
4-
#
52
## Ruby script to connect to two TelloEDU drones and control them simultaneously
63

74
require 'socket'

thread_tello.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# https://github.com/katoy/dron-tello/blob/master/tello.rb
2-
require 'socket'
3-
41
## Ruby 2.x script to control Tello drones using Threads
2+
require 'socket'
53

64
class Tello
75
def initialize(local)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)