Class MockEncoder
java.lang.Object
xbot.common.controls.sensors.XEncoder
xbot.common.controls.sensors.mock_adapters.MockEncoder
- All Implemented Interfaces:
ISimulatableSensor
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XEncoder
XEncoder.XEncoderFactory
-
Field Summary
Fields inherited from class xbot.common.controls.sensors.XEncoder
distancePerPulse, distancePerPulseSupplier, isInverted
-
Constructor Summary
ConstructorDescriptionMockEncoder
(String name, int aChannel, int bChannel, double defaultDistancePerPulse, PropertyFactory propMan, DevicePolice police) MockEncoder
(String prefix, PropertyFactory propMan) -
Method Summary
Modifier and TypeMethodDescriptionprotected double
protected double
getRate()
void
ingestSimulationData
(org.json.JSONObject payload) void
setDistance
(double distance) void
setRate
(double newRate) void
setSamplesToAverage
(int samples) Methods inherited from class xbot.common.controls.sensors.XEncoder
getAdjustedDistance, getAdjustedRate, setDistancePerPulseSupplier, setInverted
-
Constructor Details
-
MockEncoder
@AssistedInject public MockEncoder(@Assisted("name") String name, @Assisted("aChannel") int aChannel, @Assisted("bChannel") int bChannel, @Assisted("defaultDistancePerPulse") double defaultDistancePerPulse, PropertyFactory propMan, DevicePolice police) -
MockEncoder
-
-
Method Details
-
setDistance
public void setDistance(double distance) -
getRate
protected double getRate() -
setRate
public void setRate(double newRate) -
getDistance
protected double getDistance()- Specified by:
getDistance
in classXEncoder
-
setSamplesToAverage
public void setSamplesToAverage(int samples) - Specified by:
setSamplesToAverage
in classXEncoder
-
ingestSimulationData
public void ingestSimulationData(org.json.JSONObject payload) - Specified by:
ingestSimulationData
in interfaceISimulatableSensor
-