UAV::Pilot::WumpusRover::Server
my $backend = UAV::Pilot::WumpusRover::Server::Backend::RaspberryPiI2C->new; my $server = UAV::Pilot::WumpusRover::Server->new({ backend => $backend, }); $server->start_listen_loop;
A server for running the WumpusRover. Listens on specified UDP port, defaulting to <UAV::Pilot::WumpusRover-DEFAULT_PORT>>.
<UAV::Pilot::WumpusRover-
Starts listening on the UDP port. Loops indefinitely.
process_packet( $packet )
Does the right thing with $packet (a UAV::Pilot::WumpusRover::Packet object).
$packet
UAV::Pilot::WumpusRover::Packet
The channel min/max values that you can set. Channels are numbered 1 through 8.
Note that these are the min/max values that are input to the server. The values output by the backend is set by the backend.
Sets the raw min/max value for the associated channel number. Channels are numbered 1 through 8.
_map_value( $in_min, $in_max, $out_min, $out_max, $input, )
Given the input min/max settings, maps the input number to an equivalent output between the output min/max. For instance:
$self->_map_value( 0, 10, 0, 30, 5, );
Would return 15.
Note that this returns 0 if $in_max - $in_min == 0, which avoids a divide-by-zero error. This isn't correct behavior and will be fixed Soon(tm). The output min/max settings don't have this problem.
$in_max - $in_min == 0
The primary use of this method is for backends to map the channel values held by the Server object into the output needed by the backend connection.
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.