Package edu.wpi.first.wpilibj
Class GearTooth
- java.lang.Object
-
- edu.wpi.first.wpilibj.Counter
-
- edu.wpi.first.wpilibj.GearTooth
-
- All Implemented Interfaces:
CounterBase,PIDSource,Sendable,AutoCloseable
@Deprecated(since="2020", forRemoval=true) public class GearTooth extends Counter
Deprecated, for removal: This API element is subject to removal in a future version.The only sensor this works with is no longer available and no teams use it according to FMS usage reporting.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
-
-
Field Summary
-
Fields inherited from class edu.wpi.first.wpilibj.Counter
m_downSource, m_upSource
-
-
Constructor Summary
Constructors Constructor Description GearTooth(int channel)Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a channel.GearTooth(int channel, boolean directionSensitive)Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a channel.GearTooth(DigitalSource source)Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a digital input.GearTooth(DigitalSource source, boolean directionSensitive)Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a digital input.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidenableDirectionSensing(boolean directionSensitive)Deprecated, for removal: This API element is subject to removal in a future version.Common code called by the constructors.voidinitSendable(SendableBuilder builder)Deprecated, for removal: This API element is subject to removal in a future version.Initializes thisSendableobject.-
Methods inherited from class edu.wpi.first.wpilibj.Counter
clearDownSource, clearUpSource, close, 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, setUpSourceEdge
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wpi.first.wpilibj.Sendable
addChild, getName, getSubsystem, setName, setName, setName, setName, setSubsystem
-
-
-
-
Constructor Detail
-
GearTooth
public GearTooth(int channel)
Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a channel.No direction sensing is assumed.
- Parameters:
channel- The GPIO channel that the sensor is connected to.
-
GearTooth
public GearTooth(int channel, boolean directionSensitive)Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a channel.- Parameters:
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.
-
GearTooth
public GearTooth(DigitalSource source, boolean directionSensitive)
Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a digital input. This should be used when sharing digital inputs.- Parameters:
source- An existing DigitalSource object (such as a DigitalInput)directionSensitive- True to enable the pulse length decoding in hardware to specify count direction.
-
GearTooth
public GearTooth(DigitalSource source)
Deprecated, for removal: This API element is subject to removal in a future version.Construct a GearTooth sensor given a digital input. This should be used when sharing digital inputs.No direction sensing is assumed.
- Parameters:
source- An object that fully describes the input that the sensor is connected to.
-
-
Method Detail
-
enableDirectionSensing
public void enableDirectionSensing(boolean directionSensitive)
Deprecated, for removal: This API element is subject to removal in a future version.Common code called by the constructors.
-
initSendable
public void initSendable(SendableBuilder builder)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SendableInitializes thisSendableobject.- Specified by:
initSendablein interfaceSendable- Overrides:
initSendablein classCounter- Parameters:
builder- sendable builder
-
-