public class Encoder extends AbstractEncoder
AbstractEncoder.PIDMode
Constructor and Description |
---|
Encoder(int aChannel,
int bChannel)
Creates an Encoder.
|
Encoder(int aChannel,
int bChannel,
boolean reverse)
Creates an Encoder that is optionally reversed.
|
Modifier and Type | Method and Description |
---|---|
int |
get()
Gets the value of this Encoder.
|
double |
getRate()
Gets the rate of this Encoder.
|
void |
reset()
Resets this PIDSource.
|
getForPID, getPIDMode, isReversed, setPIDMode, setReversed
public Encoder(int aChannel, int bChannel)
aChannel
- This Encoder's first port.bChannel
- This Encoder's second port.public Encoder(int aChannel, int bChannel, boolean reverse)
aChannel
- This Encoder's first port.bChannel
- This Encoder's second port.reverse
- If this Encoder should be reversed.public void reset()
PIDSource
reset
in interface PIDSource
reset
in class AbstractEncoder
public int get()
AbstractEncoder
get
in class AbstractEncoder
public double getRate()
AbstractEncoder
getRate
in class AbstractEncoder