Sha256: 06709bfdd023d17df1f79617cfea7d09632896a3e7d64f45a66756c6f0b2ccc2

Contents?: true

Size: 461 Bytes

Versions: 7

Compression:

Stored size: 461 Bytes

Contents

require 'artoo/drivers/driver'

module Artoo
  module Drivers
    # Ardrone video driver behaviors
    class ArdroneVideo < Driver
      def start_driver
        every(interval) do
          handle_frame
        end

        super
      end

      def handle_frame(*params)
        frame = connection.video_parser.get_frame
        publish(event_topic_name("update"), "frame", frame)
        publish(event_topic_name("frame"), frame)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
artoo-0.4.0 lib/artoo/drivers/ardrone_video.rb
artoo-0.3.0 lib/artoo/drivers/ardrone_video.rb
artoo-0.2.0 lib/artoo/drivers/ardrone_video.rb
artoo-0.1.3 lib/artoo/drivers/ardrone_video.rb
artoo-0.1.2 lib/artoo/drivers/ardrone_video.rb
artoo-0.1.1 lib/artoo/drivers/ardrone_video.rb
artoo-0.1.0 lib/artoo/drivers/ardrone_video.rb