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.
|
void |
initSendable(SendableBuilder builder)
Initializes this
Sendable object. |
clearDownSource, clearUpSource, free, get, getDirection, getDistance, getFPGAIndex, getPeriod, getPIDSourceType, getRate, getSamplesToAverage, getStopped, pidGet, reset, setDistancePerPulse, setDownSource, setDownSource, setDownSource, setDownSourceEdge, setExternalDirectionMode, setMaxPeriod, setPIDSourceType, setPulseLengthMode, setReverseDirection, setSamplesToAverage, setSemiPeriodMode, setUpdateWhenEmpty, setUpDownCounterMode, setUpSource, setUpSource, setUpSource, setUpSourceEdgecheckAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModuleaddChild, getName, getSubsystem, setName, setName, setName, setSubsystemclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getSubsystem, setName, setName, setSubsystempublic 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 describes the input that the sensor is connected to.public void enableDirectionSensing(boolean directionSensitive)
public void initSendable(SendableBuilder builder)
SendableSendable object.initSendable in interface SendableinitSendable in class Counterbuilder - sendable builder