Class GyroTrimConfigs
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.public class GyroTrimConfigs : IParentConfiguration, ISerializable, ICloneable
- Inheritance
-
GyroTrimConfigs
- Implements
- Inherited Members
Fields
GyroScalarX
The gyro scalar component for the X axis.
- Minimum Value-180
- Maximum Value180
- Default Value0
- Unitsdeg per rotation
public double GyroScalarX
Field Value
GyroScalarY
The gyro scalar component for the Y axis.
- Minimum Value-180
- Maximum Value180
- Default Value0
- Unitsdeg per rotation
public double GyroScalarY
Field Value
GyroScalarZ
The gyro scalar component for the Z axis.
- Minimum Value-180
- Maximum Value180
- Default Value0
- Unitsdeg per rotation
public double GyroScalarZ
Field Value
Methods
Clone()
Creates a copy of this config group.
public GyroTrimConfigs Clone()
Returns
Deserialize(string)
Deserialize string and put values into this object
public StatusCode Deserialize(string to_deserialize)
Parameters
to_deserializestringString to deserialize
Returns
- StatusCode
OK if deserialization is OK
Serialize()
Serialize this object into a string
public string Serialize()
Returns
- string
This object's data serialized into a string
ToString()
Provides the string representation of this object
public override string ToString()
Returns
WithGyroScalarX(double)
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 Value180
- Default Value0
- Unitsdeg per rotation
public GyroTrimConfigs WithGyroScalarX(double newGyroScalarX)
Parameters
newGyroScalarXdoubleParameter to modify
Returns
- GyroTrimConfigs
Itself
WithGyroScalarY(double)
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 Value180
- Default Value0
- Unitsdeg per rotation
public GyroTrimConfigs WithGyroScalarY(double newGyroScalarY)
Parameters
newGyroScalarYdoubleParameter to modify
Returns
- GyroTrimConfigs
Itself
WithGyroScalarZ(double)
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 Value180
- Default Value0
- Unitsdeg per rotation
public GyroTrimConfigs WithGyroScalarZ(double newGyroScalarZ)
Parameters
newGyroScalarZdoubleParameter to modify
Returns
- GyroTrimConfigs
Itself