Module: Tello
- Defined in:
- lib/tello.rb,
lib/tello/dsl.rb,
lib/tello/wifi.rb,
lib/tello/state.rb,
lib/tello/client.rb,
lib/tello/version.rb
Overview
version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.2.0'
Instance Attribute Summary collapse
-
#ip ⇒ Object
Flag for testing.
-
#os ⇒ Object
Flag for testing.
-
#port ⇒ Object
Flag for testing.
-
#testing ⇒ Object
Flag for testing.
Class Method Summary collapse
- .os ⇒ Object
- .state ⇒ Object
-
.store_state(str) ⇒ Object
Take a Tello state string, parse to a hash, and store.
- .testing ⇒ Object
- .testing=(t) ⇒ Object
Instance Attribute Details
#ip ⇒ Object
Flag for testing
5 6 7 |
# File 'lib/tello.rb', line 5 def ip @ip end |
#os ⇒ Object
Flag for testing
5 6 7 |
# File 'lib/tello.rb', line 5 def os @os end |
#port ⇒ Object
Flag for testing
5 6 7 |
# File 'lib/tello.rb', line 5 def port @port end |
#testing ⇒ Object
Flag for testing
5 6 7 |
# File 'lib/tello.rb', line 5 def testing @testing end |
Class Method Details
.os ⇒ Object
9 |
# File 'lib/tello.rb', line 9 def self.os; @os end |
.state ⇒ Object
23 |
# File 'lib/tello/state.rb', line 23 def state; @state end |
.store_state(str) ⇒ Object
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"
13 14 15 16 17 18 19 20 21 |
# 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 ⇒ Object
7 |
# File 'lib/tello.rb', line 7 def self.testing; @testing end |
.testing=(t) ⇒ Object
8 |
# File 'lib/tello.rb', line 8 def self.testing=(t); @testing=(t) end |