#include <ArIrrfDevice.h>
Inheritance diagram for ArIrrfDevice:
This class is for use with a PB9 IR rangefinder. It has the packethandler necessary to process the packets, and will put the data into ArRangeBuffers for use with obstacle avoidance, etc.
The PB9 is still under development, and only works on an H8 controller running AROS.
Public Member Functions | |
ArIrrfDevice (size_t currentBufferSize=91, size_t cumulativeBufferSize=273, const char *name="irrf") | |
Constructor. | |
bool | packetHandler (ArRobotPacket *packet) |
The packet handler for use when connecting to an H8 micro-controller. | |
void | setCumulativeMaxRange (double r) |
Maximum range for a reading to be added to the cumulative buffer (mm). | |
virtual void | setRobot (ArRobot *) |
virtual | ~ArIrrfDevice () |
Destructor. | |
Protected Member Functions | |
void | processReadings (void) |
Protected Attributes | |
double | myCumulativeMaxRange |
double | myFilterFarDist |
double | myFilterNearDist |
std::map< int, ArSensorReading * > | myIrrfReadings |
ArTime | myLastReading |
ArRetFunctor1C< bool, ArIrrfDevice, ArRobotPacket * > | myPacketHandler |
|
The packet handler for use when connecting to an H8 micro-controller. This is the packet handler for the PB9 data, which is sent via the micro controller, to the client. This will read the data from the packets, and then call processReadings to filter add the data to the current and cumulative buffers. |