Class WsAnalogGyro
- java.lang.Object
-
- org.wildstang.framework.io.inputs.Input
-
- org.wildstang.framework.io.inputs.AnalogInput
-
- org.wildstang.hardware.roborio.inputs.WsAnalogGyro
-
public class WsAnalogGyro extends AnalogInput
Reads an analog gyro.
-
-
Constructor Summary
Constructors Constructor Description WsAnalogGyro(java.lang.String p_name, int p_channel, boolean p_driftCompensation)
Construct the analog gyro.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calibrate()
Re-calibrate the gyro.double
readRawValue()
Reads the value from the gyro.-
Methods inherited from class org.wildstang.framework.io.inputs.AnalogInput
getValue, readDataFromInput, setValue
-
Methods inherited from class org.wildstang.framework.io.inputs.Input
addInputListener, disable, enable, getInputListeners, getName, hasValueChanged, isEnabled, notifyListeners, removeAllListeners, removeInputListener, setValueChanged, update
-
-
-
-
Constructor Detail
-
WsAnalogGyro
public WsAnalogGyro(java.lang.String p_name, int p_channel, boolean p_driftCompensation)
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 Detail
-
readRawValue
public double readRawValue()
Reads the value from the gyro.- Specified by:
readRawValue
in classAnalogInput
- Returns:
- Raw value from the gyro.
-
calibrate
public void calibrate()
Re-calibrate the gyro.
-
-