mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Removed analog and digital module numbers
AnalogModule and DigitalModule classes still exist, at least until they are refactored into the classes that use them. Change-Id: I5544d5418822f19d54ba0a5d651e64fad8b7b10d
This commit is contained in:
@@ -22,36 +22,21 @@ void GearTooth::EnableDirectionSensing(bool directionSensitive)
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a channel.
|
||||
*
|
||||
* The default module is assumed.
|
||||
*
|
||||
* @param channel The GPIO channel on the digital module that the sensor is connected to.
|
||||
*
|
||||
* @param channel The GPIO channel that the sensor is connected to.
|
||||
* @param directionSensitive Enable the pulse length decoding in hardware to specify count direction.
|
||||
*/
|
||||
GearTooth::GearTooth(uint32_t channel, bool directionSensitive)
|
||||
: Counter(channel)
|
||||
{
|
||||
EnableDirectionSensing(directionSensitive);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a channel and module.
|
||||
*
|
||||
* @param moduleNumber The digital module (1 or 2).
|
||||
* @param channel The GPIO channel on the digital module that the sensor is connected to.
|
||||
* @param directionSensitive Enable the pulse length decoding in hardware to specify count direction.
|
||||
*/
|
||||
GearTooth::GearTooth(uint8_t moduleNumber, uint32_t channel, bool directionSensitive)
|
||||
: Counter(moduleNumber, channel)
|
||||
{
|
||||
EnableDirectionSensing(directionSensitive);
|
||||
LiveWindow::GetInstance()->AddSensor("GearTooth", moduleNumber, channel, this);
|
||||
LiveWindow::GetInstance()->AddSensor("GearTooth", channel, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a digital input.
|
||||
* This should be used when sharing digial inputs.
|
||||
*
|
||||
*
|
||||
* @param source An object that fully descibes the input that the sensor is connected to.
|
||||
* @param directionSensitive Enable the pulse length decoding in hardware to specify count direction.
|
||||
*/
|
||||
@@ -77,4 +62,3 @@ GearTooth::~GearTooth()
|
||||
std::string GearTooth::GetSmartDashboardType() {
|
||||
return "GearTooth";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user