Class WsAnalogGyro
java.lang.Object
org.wildstang.framework.io.inputs.Input
org.wildstang.framework.io.inputs.AnalogInput
org.wildstang.hardware.roborio.inputs.WsAnalogGyro
Reads an analog gyro.
-
Constructor Summary
ConstructorsConstructorDescriptionWsAnalogGyro(String p_name, int p_channel, boolean p_driftCompensation) Construct the analog gyro. -
Method Summary
Modifier and TypeMethodDescriptionvoidRe-calibrate the gyro.doubleReads the value from the gyro.Methods inherited from class org.wildstang.framework.io.inputs.AnalogInput
getValue, readDataFromInput, setValueMethods inherited from class org.wildstang.framework.io.inputs.Input
addInputListener, disable, enable, getInputListeners, getName, hasValueChanged, isEnabled, notifyListeners, removeAllListeners, removeInputListener, setValueChanged, update
-
Constructor Details
-
WsAnalogGyro
Construct the analog gyro.- Parameters:
p_name- Descriptive name for the input.p_channel- Hardware port the gyro is connected to.p_driftCompensation- Drift compensation factor.
-
-
Method Details
-
readRawValue
public double readRawValue()Reads the value from the gyro.- Specified by:
readRawValuein classAnalogInput- Returns:
- Raw value from the gyro.
-
calibrate
public void calibrate()Re-calibrate the gyro.
-