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