|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.Counter
edu.wpi.first.wpilibj.GearTooth
public class GearTooth
Alias for counter class. Implement the gear tooth sensor supplied by FIRST. Currently there is no reverse sensing on the gear tooth sensor, but in future versions we might implement the necessary timing in the FPGA to sense direction.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.Counter |
---|
Counter.Mode |
Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj.CounterBase |
---|
CounterBase.EncodingType |
Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj.PIDSource |
---|
PIDSource.PIDSourceParameter |
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond |
Constructor Summary | |
---|---|
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. |
|
GearTooth(int slot,
int channel)
Construct a GearTooth sensor given a channel and module. |
|
GearTooth(int slot,
int channel,
boolean directionSensitive)
Construct a GearTooth sensor given a channel and module. |
Method Summary | |
---|---|
void |
enableDirectionSensing(boolean directionSensitive)
Common code called by the constructors. |
java.lang.String |
getSmartDashboardType()
Live Window code, only does anything if live window is activated. |
Methods inherited from class edu.wpi.first.wpilibj.Counter |
---|
clearDownSource, clearUpSource, free, get, getDirection, getDistance, getPeriod, getRate, getSamplesToAverage, getStopped, getTable, initTable, pidGet, reset, setDistancePerPulse, setDownSource, setDownSource, setDownSource, setDownSource, setDownSourceEdge, setExternalDirectionMode, setMaxPeriod, setPIDSourceParameter, setPulseLengthMode, setReverseDirection, setSamplesToAverage, setSemiPeriodMode, setUpdateWhenEmpty, setUpDownCounterMode, setUpSource, setUpSource, setUpSource, setUpSource, setUpSourceEdge, start, startLiveWindowMode, stop, stopLiveWindowMode, updateTable |
Methods inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GearTooth(int channel, boolean directionSensitive)
channel
- The GPIO channel on the digital module that the sensor is connected to.directionSensitive
- Enable the pulse length decoding in hardware to specify count direction.public GearTooth(int channel)
channel
- The GPIO channel on the digital module that the sensor is connected to.public GearTooth(int slot, int channel, boolean directionSensitive)
slot
- The slot in the chassis that the digital module is plugged in to.channel
- The GPIO channel on the digital module that the sensor is connected to.directionSensitive
- Enable the pulse length decoding in hardware to specify count direction.public GearTooth(int slot, int channel)
slot
- The slot in the chassis that the digital module is plugged in to.channel
- The GPIO channel on the digital module that the sensor is connected to.public GearTooth(DigitalSource source, boolean directionSensitive)
source
- An object that fully descibes the input that the sensor is connected to.directionSensitive
- 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.Method Detail |
---|
public void enableDirectionSensing(boolean directionSensitive)
public java.lang.String getSmartDashboardType()
Counter
getSmartDashboardType
in interface Sendable
getSmartDashboardType
in class Counter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |