Sha256: 8cb435af6f7a0136046c262ca304686f1bc2599d1615c6f736a20c7c9636f80f

Contents?: true

Size: 561 Bytes

Versions: 32

Compression:

Stored size: 561 Bytes

Contents

require 'artoo'

connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
device :drone, :driver => :ardrone, :connection => :ardrone

connection :navigation, :adaptor => :ardrone_navigation, :port => '192.168.1.1:5554'
device :nav, :driver => :ardrone_navigation, :connection => :navigation

work do
  on nav, :update => :nav_update
  drone.start
  drone.take_off
  
  after(50.seconds) { drone.hover.land }
  after(60.seconds) { drone.stop }
end

def nav_update(*data)
  data[1].drone_state.each do |name, val|
    p "#{name}: #{val}"
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
artoo-1.8.2 examples/ardrone_nav.rb
artoo-1.8.1 examples/ardrone_nav.rb
artoo-1.8.0 examples/ardrone_nav.rb
artoo-1.6.7 examples/ardrone_nav.rb
artoo-1.6.6 examples/ardrone_nav.rb
artoo-1.6.5 examples/ardrone_nav.rb
artoo-1.6.4 examples/ardrone_nav.rb
artoo-1.6.3 examples/ardrone_nav.rb
artoo-1.6.2 examples/ardrone_nav.rb
artoo-1.6.1 examples/ardrone_nav.rb
artoo-1.6.0 examples/ardrone_nav.rb
artoo-1.5.0 examples/ardrone_nav.rb
artoo-1.4.1 examples/ardrone_nav.rb
artoo-1.4.0 examples/ardrone_nav.rb
artoo-1.3.0 examples/ardrone_nav.rb
artoo-1.2.2 examples/ardrone_nav.rb
artoo-1.2.1 examples/ardrone_nav.rb
artoo-1.2.0 examples/ardrone_nav.rb
artoo-1.1.1 examples/ardrone_nav.rb
artoo-1.1.0 examples/ardrone_nav.rb