Module: Kuby::Link::FlightMethods
- Included in:
- Kuby::Link
- Defined in:
- lib/kuby/link/flight_methods.rb
Instance Method Summary collapse
- #abort ⇒ Object
- #brake ⇒ Object
- #set_throttle(t) ⇒ Object
- #stage! ⇒ Object
- #throttle ⇒ Object
- #throttle_down ⇒ Object
- #throttle_full ⇒ Object
- #throttle_up ⇒ Object
- #throttle_zero ⇒ Object
- #toggle_gear ⇒ Object
- #toggle_light ⇒ Object
- #toggle_rcs ⇒ Object
- #toggle_sas ⇒ Object
Instance Method Details
#abort ⇒ Object
4 5 6 |
# File 'lib/kuby/link/flight_methods.rb', line 4 def abort api_get('f.abort') end |
#brake ⇒ Object
15 16 17 |
# File 'lib/kuby/link/flight_methods.rb', line 15 def brake api_get('f.brake') end |
#set_throttle(t) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/kuby/link/flight_methods.rb', line 19 def set_throttle(t) if t > 1.0 t = 1.0 elsif t < 0.0 t = 0.0 end api_set('f.setThrottle', t) end |
#stage! ⇒ Object
29 30 31 |
# File 'lib/kuby/link/flight_methods.rb', line 29 def stage! api_get('f.stage') end |
#throttle ⇒ Object
33 34 35 |
# File 'lib/kuby/link/flight_methods.rb', line 33 def throttle api_get('f.throttle').to_f end |
#throttle_down ⇒ Object
37 38 39 |
# File 'lib/kuby/link/flight_methods.rb', line 37 def throttle_down api_get('f.throttleDown') end |
#throttle_full ⇒ Object
45 46 47 |
# File 'lib/kuby/link/flight_methods.rb', line 45 def throttle_full api_get('f.throttleFull') end |
#throttle_up ⇒ Object
41 42 43 |
# File 'lib/kuby/link/flight_methods.rb', line 41 def throttle_up api_get('f.throttleUp') end |
#throttle_zero ⇒ Object
49 50 51 |
# File 'lib/kuby/link/flight_methods.rb', line 49 def throttle_zero api_get('f.throttleZero') end |
#toggle_gear ⇒ Object
53 54 55 |
# File 'lib/kuby/link/flight_methods.rb', line 53 def toggle_gear api_get('f.gear') end |
#toggle_light ⇒ Object
57 58 59 |
# File 'lib/kuby/link/flight_methods.rb', line 57 def toggle_light api_get('f.light') end |
#toggle_rcs ⇒ Object
61 62 63 |
# File 'lib/kuby/link/flight_methods.rb', line 61 def toggle_rcs api_get('f.rcs') end |
#toggle_sas ⇒ Object
65 66 67 |
# File 'lib/kuby/link/flight_methods.rb', line 65 def toggle_sas api_get('f.sas') end |