public class GearTooth extends Counter
Counter.ModeCounterBase.EncodingTypem_downSource, m_upSourcekAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPCMModules, kPDPChannels, kPDPModules, kPwmChannels, kRelayChannels, kSolenoidChannels, kSystemClockTicksPerMicrosecond| Constructor and Description |
|---|
GearTooth(DigitalSource source)
Construct a GearTooth sensor given a digital input.
|
GearTooth(DigitalSource source,
boolean directionSensitive)
Construct a GearTooth sensor given a digital input.
|
GearTooth(int channel)
Construct a GearTooth sensor given a channel.
|
GearTooth(int channel,
boolean directionSensitive)
Construct a GearTooth sensor given a channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enableDirectionSensing(boolean directionSensitive)
Common code called by the constructors.
|
java.lang.String |
getSmartDashboardType()
The string representation of the named data type that will be used by the smart dashboard for
this
Sendable. |
clearDownSource, clearUpSource, free, get, getDirection, getDistance, getFPGAIndex, getPeriod, getPIDSourceType, getRate, getSamplesToAverage, getStopped, getTable, initTable, pidGet, reset, setDistancePerPulse, setDownSource, setDownSource, setDownSource, setDownSourceEdge, setExternalDirectionMode, setMaxPeriod, setPIDSourceType, setPulseLengthMode, setReverseDirection, setSamplesToAverage, setSemiPeriodMode, setUpdateWhenEmpty, setUpDownCounterMode, setUpSource, setUpSource, setUpSource, setUpSourceEdge, startLiveWindowMode, stopLiveWindowMode, updateTablecheckAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModulepublic GearTooth(int channel)
No direction sensing is assumed.
channel - The GPIO channel that the sensor is connected to.public GearTooth(int channel, boolean directionSensitive)
channel - The DIO channel that the sensor is connected to. 0-9 are on-board,
10-25 are on the MXP portdirectionSensitive - True to enable the pulse length decoding in hardware to specify count
direction.public GearTooth(DigitalSource source, boolean directionSensitive)
source - An existing DigitalSource object (such as a DigitalInput)directionSensitive - True to enable the pulse length decoding in hardware to specify count
direction.public GearTooth(DigitalSource source)
No direction sensing is assumed.
source - An object that fully descibes the input that the sensor is connected to.public void enableDirectionSensing(boolean directionSensitive)
public java.lang.String getSmartDashboardType()
SendableSendable.getSmartDashboardType in interface SendablegetSmartDashboardType in class CounterSendable.