NAME
UAV::Pilot::Control::ARDrone::SDLNavOutput
SYNOPSIS
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 );
DESCRIPTION
Graphically renders a UAV::Pilot::Driver::ARDrone::NavPacket
using SDL.
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
.
METHODS
new
new({
driver => UAV::Pilot::Driver::ARDrone->new( ... ),
})
Constructor. The param driver
takes a UAV::Pilot::Driver::ARDrone
object.
render
render( $nav_packet )
Updates the graphic with the given nav packet data.