Package xbot.common.controls.sensors
Class AnalogDistanceSensor
java.lang.Object
xbot.common.controls.sensors.XAnalogDistanceSensor
xbot.common.controls.sensors.AnalogDistanceSensor
- All Implemented Interfaces:
DistanceSensor
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XAnalogDistanceSensor
XAnalogDistanceSensor.VoltageMaps, XAnalogDistanceSensor.XAnalogDistanceSensorFactory
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAnalogDistanceSensor
(XAnalogInput.XAnalogInputFactory analogInputFactory, int channel, DoubleFunction<Double> voltageMap, String prefix, PropertyFactory propMan) -
Method Summary
Modifier and TypeMethodDescriptiondouble
void
setAveraging
(boolean shouldAverage) void
setDistanceOffset
(double offset) void
setVoltageOffset
(double offset)
-
Field Details
-
input
-
-
Constructor Details
-
AnalogDistanceSensor
@AssistedInject public AnalogDistanceSensor(XAnalogInput.XAnalogInputFactory analogInputFactory, @Assisted("channel") int channel, @Assisted("voltageMap") DoubleFunction<Double> voltageMap, @Assisted("prefix") String prefix, PropertyFactory propMan)
-
-
Method Details
-
getDistance
public double getDistance()- Specified by:
getDistance
in interfaceDistanceSensor
- Specified by:
getDistance
in classXAnalogDistanceSensor
-
setAveraging
public void setAveraging(boolean shouldAverage) - Specified by:
setAveraging
in interfaceDistanceSensor
- Specified by:
setAveraging
in classXAnalogDistanceSensor
-
setVoltageOffset
public void setVoltageOffset(double offset) - Specified by:
setVoltageOffset
in classXAnalogDistanceSensor
-
setDistanceOffset
public void setDistanceOffset(double offset) - Specified by:
setDistanceOffset
in classXAnalogDistanceSensor
-