Class MockGyro
java.lang.Object
xbot.common.controls.sensors.XGyro
xbot.common.controls.sensors.mock_adapters.MockGyro
- All Implemented Interfaces:
AutoCloseable,DataFrameRefreshable,ISimulatableSensor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class xbot.common.controls.sensors.XGyro
XGyro.ImuType, XGyro.InterfaceType, XGyro.XGyroFactory -
Field Summary
Fields inherited from class xbot.common.controls.sensors.XGyro
deviceName, imuType, io -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()doubledoubledoubledoubledoubledoublevoidingestSimulationData(org.json.JSONObject payload) booleanisBroken()booleanvoidsetDeviceRawAccelX(double accel) voidsetDeviceRawAccelY(double accel) voidsetDeviceRawAccelZ(double accel) voidsetDeviceVelocityX(double velocity) voidsetDeviceVelocityY(double velocity) voidsetDeviceVelocityZ(double velocity) voidsetIsBroken(boolean broken) voidvoidvoidvoidsetYawAngularVelocity(AngularVelocity yawAngularVelocity) protected voidupdateInputs(XGyroIoInputs inputs) Methods inherited from class xbot.common.controls.sensors.XGyro
getAcceleration, getAccelerationX, getAccelerationY, getAccelerationZ, getHeading, getImuType, getPitch, getRoll, getYawAngularVelocity, refreshDataFrame
-
Constructor Details
-
MockGyro
-
-
Method Details
-
isConnected
public boolean isConnected()- Overrides:
isConnectedin classXGyro
-
setYaw
-
getDeviceYaw
-
setIsBroken
public void setIsBroken(boolean broken) -
updateInputs
- Specified by:
updateInputsin classXGyro
-
isBroken
public boolean isBroken() -
setRoll
-
getDeviceRoll
-
setPitch
-
getDevicePitch
-
setYawAngularVelocity
-
getDeviceYawAngularVelocity
-
getDeviceVelocityX
public double getDeviceVelocityX() -
setDeviceVelocityX
public void setDeviceVelocityX(double velocity) -
getDeviceVelocityY
public double getDeviceVelocityY() -
setDeviceVelocityY
public void setDeviceVelocityY(double velocity) -
getDeviceVelocityZ
public double getDeviceVelocityZ() -
setDeviceVelocityZ
public void setDeviceVelocityZ(double velocity) -
getDeviceRawAccelX
public double getDeviceRawAccelX() -
setDeviceRawAccelX
public void setDeviceRawAccelX(double accel) -
getDeviceRawAccelY
public double getDeviceRawAccelY() -
setDeviceRawAccelY
public void setDeviceRawAccelY(double accel) -
getDeviceRawAccelZ
public double getDeviceRawAccelZ() -
setDeviceRawAccelZ
public void setDeviceRawAccelZ(double accel) -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
ingestSimulationData
public void ingestSimulationData(org.json.JSONObject payload) - Specified by:
ingestSimulationDatain interfaceISimulatableSensor
-