Table of Contents

Class GyroTrimConfigs

Namespace
CTRE.Phoenix6.Configs
Assembly
Phoenix6.Hardware.dll

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

double

GyroScalarY

The gyro scalar component for the Y axis.

  • Minimum Value-180
  • Maximum Value180
  • Default Value0
  • Unitsdeg per rotation
public double GyroScalarY

Field Value

double

GyroScalarZ

The gyro scalar component for the Z axis.

  • Minimum Value-180
  • Maximum Value180
  • Default Value0
  • Unitsdeg per rotation
public double GyroScalarZ

Field Value

double

Methods

Clone()

Creates a copy of this config group.

public GyroTrimConfigs Clone()

Returns

GyroTrimConfigs

Deserialize(string)

Deserialize string and put values into this object

public StatusCode Deserialize(string to_deserialize)

Parameters

to_deserialize string

String 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

string

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

newGyroScalarX double

Parameter 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

newGyroScalarY double

Parameter 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

newGyroScalarZ double

Parameter to modify

Returns

GyroTrimConfigs

Itself