Beispiel #1
0
/**
 * Initialize the gear tooth sensor.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 * @param directionSensitive True if this geartooth sensor can differentiate between
 * foward and backward movement.
 */
void InitGearTooth(UINT8 moduleNumber, UINT32 channel, bool directionSensitive)
{
    GearTooth *gt = GTptr(moduleNumber, channel);
    if (gt) gt->EnableDirectionSensing(directionSensitive);
}
Beispiel #2
0
/**
 * Start the GearTooth sensor counting.
 * Start the counting for the geartooth sensor. Before this, the sensor is allocated
 * but not counting pulses.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 */
void StartGearTooth(UINT8 moduleNumber, UINT32 channel)
{
    GearTooth *gt = GTptr(moduleNumber, channel);
    if (gt) gt->Start();
}
Beispiel #3
0
/**
 * Get value from GearTooth sensor.
 * Get the current count from the sensor.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 */
INT32 GetGearTooth(UINT8 moduleNumber, UINT32 channel)
{
    GearTooth *gt = GTptr(moduleNumber, channel);
    if (gt) return gt->Get();
    return 0;
}
Beispiel #4
0
/**
 * Start the GearTooth sensor counting.
 * Start the counting for the geartooth sensor. Before this, the sensor is allocated
 * but not counting pulses.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 */
void StartGearTooth(UINT32 slot, UINT32 channel)
{
	GearTooth *gt = GTptr(slot, channel);
	if (gt) gt->Start();
}
Beispiel #5
0
/**
 * Initialize the gear tooth sensor.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 * @param directionSensitive True if this geartooth sensor can differentiate between
 * foward and backward movement.
 */
void InitGearTooth(UINT32 slot, UINT32 channel, bool directionSensitive)
{
	GearTooth *gt = GTptr(slot, channel);
	if (gt) gt->EnableDirectionSensing(directionSensitive);
}
Beispiel #6
0
/**
 * Reset the GearTooth sensor.
 * Reset the count to zero for the gear tooth sensor.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 */
void ResetGearTooth(UINT32 slot, UINT32 channel)
{
	GearTooth *gt = GTptr(slot, channel);
	if (gt) gt->Reset();
}
Beispiel #7
0
/**
 * Get value from GearTooth sensor.
 * Get the current count from the sensor.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The digital I/O channel the sensor is plugged into
 */
INT32 GetGearTooth(UINT32 slot, UINT32 channel)
{
	GearTooth *gt = GTptr(slot, channel);
	if (gt) return gt->Get();
	return 0;
}