lib/artoo/drivers/ardrone_navigation.rb in artoo-0.4.0 vs lib/artoo/drivers/ardrone_navigation.rb in artoo-0.4.1
- old
+ new
@@ -2,20 +2,24 @@
module Artoo
module Drivers
# Ardrone navigation driver behaviors
class ArdroneNavigation < Driver
+
+ # Starts driver and handle updates from device
def start_driver
every(interval) do
handle_update
end
super
end
+ # Receives data from navigation and publishes
+ # and event in update topic for it
def handle_update
navdata = connection.receive_data
publish(event_topic_name("update"), navdata)
end
end
end
-end
\ No newline at end of file
+end