public class GearTooth extends Counter
Counter.Mode
CounterBase.EncodingType
PIDSource.PIDSourceParameter
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, 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.
|
String |
getSmartDashboardType()
Live Window code, only does anything if live window is activated.
|
clearDownSource, clearUpSource, free, get, getDirection, getDistance, getFPGAIndex, getPeriod, getRate, getSamplesToAverage, getStopped, getTable, initTable, pidGet, reset, setDistancePerPulse, setDownSource, setDownSource, setDownSource, setDownSourceEdge, setExternalDirectionMode, setMaxPeriod, setPIDSourceParameter, setPulseLengthMode, setReverseDirection, setSamplesToAverage, setSemiPeriodMode, setUpdateWhenEmpty, setUpDownCounterMode, setUpSource, setUpSource, setUpSource, setUpSourceEdge, startLiveWindowMode, stopLiveWindowMode, updateTable
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
public GearTooth(int channel)
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)
source
- An object that fully descibes the input that the sensor is connected to.public void enableDirectionSensing(boolean directionSensitive)
public String getSmartDashboardType()
Counter
getSmartDashboardType
in interface Sendable
getSmartDashboardType
in class Counter
Copyright © 2015. All rights reserved.