Module: Kuby::Link::FlightMethods

Included in:
Kuby::Link
Defined in:
lib/kuby/link/flight_methods.rb

Instance Method Summary collapse

Instance Method Details

#abortObject



4
5
6
# File 'lib/kuby/link/flight_methods.rb', line 4

def abort
  api_get('f.abort')
end

#brakeObject



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

#throttleObject



33
34
35
# File 'lib/kuby/link/flight_methods.rb', line 33

def throttle
  api_get('f.throttle').to_f
end

#throttle_downObject



37
38
39
# File 'lib/kuby/link/flight_methods.rb', line 37

def throttle_down
  api_get('f.throttleDown')
end

#throttle_fullObject



45
46
47
# File 'lib/kuby/link/flight_methods.rb', line 45

def throttle_full
  api_get('f.throttleFull')
end

#throttle_upObject



41
42
43
# File 'lib/kuby/link/flight_methods.rb', line 41

def throttle_up
  api_get('f.throttleUp')
end

#throttle_zeroObject



49
50
51
# File 'lib/kuby/link/flight_methods.rb', line 49

def throttle_zero
  api_get('f.throttleZero')
end

#toggle_gearObject



53
54
55
# File 'lib/kuby/link/flight_methods.rb', line 53

def toggle_gear
  api_get('f.gear')
end

#toggle_lightObject



57
58
59
# File 'lib/kuby/link/flight_methods.rb', line 57

def toggle_light
  api_get('f.light')
end

#toggle_rcsObject



61
62
63
# File 'lib/kuby/link/flight_methods.rb', line 61

def toggle_rcs
  api_get('f.rcs')
end

#toggle_sasObject



65
66
67
# File 'lib/kuby/link/flight_methods.rb', line 65

def toggle_sas
  api_get('f.sas')
end