GearTooth Class Reference

#include <GearTooth.h>

Inheritance diagram for GearTooth:

Inheritance graph
[legend]
Collaboration diagram for GearTooth:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

Alias for counter class. Implement the gear tooth sensor supplied by FIRST. Currently there is no reverse sensing on the gear tooth sensor, but in future versions we might implement the necessary timing in the FPGA to sense direction.

Constructor & Destructor Documentation

GearTooth::GearTooth ( unsigned  channel,
bool  directionSensitive = true 
)

Construct a GearTooth sensor given a channel.

The default module is assumed.

Parameters:
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.

Parameters:
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.

Parameters:
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.


The documentation for this class was generated from the following files:

Generated on Thu Oct 2 14:01:26 2008 for WPI Robotics Library by  doxygen 1.5.5