UAV::Pilot::ARDrone::SDLNavOutput
my $condvar = AnyEvent->condvar; my $events = UAV::Pilot::Events->new({ condvar => $condvar, }); my $window = UAV::Pilot::SDL::Window->new; my $sdl_nav = UAV::Pilot::ARDrone::SDLNavOutput->new({ driver => UAV::Pilot::ARDrone::Driver->new( ... ), window => $window, }); $events->register( $sdl_nav );
Graphically renders a UAV::Pilot::ARDrone::NavPacket using SDL.
UAV::Pilot::ARDrone::NavPacket
It does the UAV::Pilot::EventHandler role, and thus can be processed by UAV::Pilot::Events. It's recommended to also add the UAV::Pilot::SDL::Events handler to the events object, as that will take care of the SDL_QUIT events. Without that, there's no way to stop the process other than kill -9.
UAV::Pilot::EventHandler
UAV::Pilot::Events
UAV::Pilot::SDL::Events
SDL_QUIT
kill -9
new({ feeder => ... })
Constructor. The param feeder takes a UAV::Pilot::SDL::NavFeeder object.
feeder
UAV::Pilot::SDL::NavFeeder
render( $nav_packet )
Updates the graphic with the given nav packet data.
To install UAV::Pilot::ARDrone, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UAV::Pilot::ARDrone
CPAN shell
perl -MCPAN -e shell install UAV::Pilot::ARDrone
For more information on module installation, please visit the detailed CPAN module installation guide.