Package xbot.common.controls.sensors
Class XEncoder
java.lang.Object
xbot.common.controls.sensors.XEncoder
- Direct Known Subclasses:
EncoderWPIAdapter
,MockEncoder
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionXEncoder
(String name, int aChannel, int bChannel, double defaultDistancePerPulse, PropertyFactory propMan, DevicePolice police) XEncoder
(String prefix, PropertyFactory propMan) -
Method Summary
Modifier and TypeMethodDescriptiondouble
double
protected abstract double
protected abstract double
getRate()
void
setDistancePerPulseSupplier
(Supplier<Double> supplier) void
setInverted
(boolean inverted) abstract void
setSamplesToAverage
(int samples)
-
Field Details
-
isInverted
protected boolean isInverted -
distancePerPulse
-
distancePerPulseSupplier
-
-
Constructor Details
-
XEncoder
public XEncoder(String name, int aChannel, int bChannel, double defaultDistancePerPulse, PropertyFactory propMan, DevicePolice police) -
XEncoder
-
XEncoder
-
-
Method Details
-
setDistancePerPulseSupplier
-
getAdjustedDistance
public double getAdjustedDistance() -
getAdjustedRate
public double getAdjustedRate() -
setInverted
public void setInverted(boolean inverted) -
getRate
protected abstract double getRate() -
getDistance
protected abstract double getDistance() -
setSamplesToAverage
public abstract void setSamplesToAverage(int samples)
-