module Tello
Tello
module and requires
Tello::DSL
Define Tello
domain-specific language
Tello
state
version.rb
Constants
- VERSION
Attributes
ip[RW]
Flag for testing
os[RW]
Flag for testing
port[RW]
Flag for testing
testing[RW]
Flag for testing
Public Class Methods
os()
click to toggle source
# File lib/tello.rb, line 9 def self.os; @os end
state()
click to toggle source
# File lib/tello/state.rb, line 23 def state; @state end
store_state(str)
click to toggle source
Take a Tello
state string, parse to a hash, and store. String
in the form:
"pitch:11;roll:-18;yaw:118;vgx:0;vgy:0;vgz:0;templ:78;temph:80;tof:10;\
h:0;bat:27;baro:-64.81;time:0;agx:242.00;agy:315.00;agz:-1057.00;\r\n"
# File lib/tello/state.rb, line 13 def store_state(str) str.strip! @state = Hash[ str.split(';').map do |pair| k, v = pair.split(':', 2) [k.to_sym, v.to_i] end ] end
testing()
click to toggle source
# File lib/tello.rb, line 7 def self.testing; @testing end
testing=(t)
click to toggle source
# File lib/tello.rb, line 8 def self.testing=(t); @testing=(t) end