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, setReversedpublic 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()
PIDSourcereset in interface PIDSourcereset in class AbstractEncoderpublic int get()
AbstractEncoderget in class AbstractEncoderpublic double getRate()
AbstractEncodergetRate in class AbstractEncoder