Package com.ctre.phoenix6.configs
Class GyroTrimConfigs
java.lang.Object
com.ctre.phoenix6.configs.GyroTrimConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
public class GyroTrimConfigs extends Object implements ParentConfiguration
Configs to trim the Pigeon2's gyroscope.
Pigeon2 allows the user to trim the gyroscope's sensitivity. While this isn't necessary for the Pigeon2, as it comes calibrated out-of-the-box, users can make use of this to make the Pigeon2 even more accurate for their application.
-
Field Summary
Fields Modifier and Type Field Description double
GyroScalarX
The gyro scalar component for the X axis Minimum Value: -180 Maximum Value: 180 Default Value: 0 Units: deg per rotationdouble
GyroScalarY
The gyro scalar component for the Y axis Minimum Value: -180 Maximum Value: 180 Default Value: 0 Units: deg per rotationdouble
GyroScalarZ
The gyro scalar component for the Z axis Minimum Value: -180 Maximum Value: 180 Default Value: 0 Units: deg per rotation -
Constructor Summary
Constructors Constructor Description GyroTrimConfigs()
-
Method Summary
Modifier and Type Method Description StatusCode
deserialize(String to_deserialize)
String
serialize()
String
toString()
GyroTrimConfigs
withGyroScalarX(double newGyroScalarX)
Modifies this configuration's GyroScalarX parameter and returns itself for method-chaining and easier to use config API.GyroTrimConfigs
withGyroScalarY(double newGyroScalarY)
Modifies this configuration's GyroScalarY parameter and returns itself for method-chaining and easier to use config API.GyroTrimConfigs
withGyroScalarZ(double newGyroScalarZ)
Modifies this configuration's GyroScalarZ parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
GyroScalarX
The gyro scalar component for the X axis- Minimum Value: -180
- Maximum Value: 180
- Default Value: 0
- Units: deg per rotation
-
GyroScalarY
The gyro scalar component for the Y axis- Minimum Value: -180
- Maximum Value: 180
- Default Value: 0
- Units: deg per rotation
-
GyroScalarZ
The gyro scalar component for the Z axis- Minimum Value: -180
- Maximum Value: 180
- Default Value: 0
- Units: deg per rotation
-
-
Constructor Details
-
GyroTrimConfigs
public GyroTrimConfigs()
-
-
Method Details
-
withGyroScalarX
Modifies this configuration's GyroScalarX parameter and returns itself for method-chaining and easier to use config API.The gyro scalar component for the X axis
- Minimum Value: -180
- Maximum Value: 180
- Default Value: 0
- Units: deg per rotation
- Parameters:
newGyroScalarX
- Parameter to modify- Returns:
- Itself
-
withGyroScalarY
Modifies this configuration's GyroScalarY parameter and returns itself for method-chaining and easier to use config API.The gyro scalar component for the Y axis
- Minimum Value: -180
- Maximum Value: 180
- Default Value: 0
- Units: deg per rotation
- Parameters:
newGyroScalarY
- Parameter to modify- Returns:
- Itself
-
withGyroScalarZ
Modifies this configuration's GyroScalarZ parameter and returns itself for method-chaining and easier to use config API.The gyro scalar component for the Z axis
- Minimum Value: -180
- Maximum Value: 180
- Default Value: 0
- Units: deg per rotation
- Parameters:
newGyroScalarZ
- Parameter to modify- Returns:
- Itself
-
toString
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-