public class AngularEncoder extends java.lang.Object implements IAngleSensor
Modifier and Type | Field and Description |
---|---|
private double |
m_countsPerRevolution |
private boolean |
m_inverted |
Constructor and Description |
---|
AngularEncoder(double countsPerRevolution,
boolean inverted)
Creator
|
Modifier and Type | Method and Description |
---|---|
double |
getAngle(double input)
This will return the angle that the sensor is reading
|
private double m_countsPerRevolution
private boolean m_inverted
public AngularEncoder(double countsPerRevolution, boolean inverted)
countsPerRevolution
- number of counts for one revolution of the encoderinverted
- is the encoder going the wrong directionpublic double getAngle(double input)
IAngleSensor
getAngle
in interface IAngleSensor
input
- what is the sensor reading?