Package edu.wpi.first.wpilibj
Class MockAnalogInput
java.lang.Object
xbot.common.controls.sensors.XAnalogInput
edu.wpi.first.wpilibj.MockAnalogInput
- All Implemented Interfaces:
XBaseIO
,ISimulatableSensor
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XAnalogInput
XAnalogInput.XAnalogInputFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getAsDigital
(double threshold) double
int
double
void
ingestSimulationData
(org.json.JSONObject payload) void
setAverageBits
(int bits) void
setVoltage
(double voltage)
-
Constructor Details
-
MockAnalogInput
-
-
Method Details
-
setVoltage
public void setVoltage(double voltage) -
getVoltage
public double getVoltage()- Specified by:
getVoltage
in classXAnalogInput
-
getAverageVoltage
public double getAverageVoltage()- Specified by:
getAverageVoltage
in classXAnalogInput
-
setAverageBits
public void setAverageBits(int bits) - Specified by:
setAverageBits
in classXAnalogInput
-
getChannel
public int getChannel()- Specified by:
getChannel
in interfaceXBaseIO
-
getAsDigital
public boolean getAsDigital(double threshold) - Specified by:
getAsDigital
in classXAnalogInput
-
ingestSimulationData
public void ingestSimulationData(org.json.JSONObject payload) - Specified by:
ingestSimulationData
in interfaceISimulatableSensor
-