#include <GearTooth.h>
Public Member Functions | |
GearTooth (unsigned channel, bool directionSensitive=true) | |
GearTooth (unsigned slot, unsigned channel, bool directionSensitive=true) | |
GearTooth (DigitalSource *source, bool directionSensitive=true) | |
~GearTooth (void) | |
Static Public Attributes | |
static const unsigned | kGearToothThreshold = 55 |
55 uSec for threshold |
GearTooth::GearTooth | ( | unsigned | channel, | |
bool | directionSensitive = true | |||
) |
Construct a GearTooth sensor given a channel.
The default module is assumed.
channel | The GPIO channel on the digital module that the sensor is connected to. | |
directionSensitive | Enable the pulse length decoding in hardware to specify count direction. |
GearTooth::GearTooth | ( | unsigned | slot, | |
unsigned | channel, | |||
bool | directionSensitive = true | |||
) |
Construct a GearTooth sensor given a channel and module.
slot | The slot in the chassis that the digital module is plugged in to. | |
channel | The GPIO channel on the digital module that the sensor is connected to. | |
directionSensitive | Enable the pulse length decoding in hardware to specify count direction. |
GearTooth::GearTooth | ( | DigitalSource * | source, | |
bool | directionSensitive = true | |||
) |
Construct a GearTooth sensor given a digital input. This should be used when sharing digial inputs.
source | An object that fully descibes the input that the sensor is connected to. | |
directionSensitive | Enable the pulse length decoding in hardware to specify count direction. |
GearTooth::~GearTooth | ( | void | ) |
Free the resources associated with a gear tooth sensor.