Class GyroTrimConfigs

java.lang.Object
com.ctre.phoenix6.configs.GyroTrimConfigs
All Implemented Interfaces:
ParentConfiguration, ISerializable, Cloneable

public class GyroTrimConfigs extends Object implements ParentConfiguration, Cloneable
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 Details

    • GyroScalarX

      public double GyroScalarX
      The gyro scalar component for the X axis.
      • Minimum Value: -180
      • Maximum Value: 180
      • Default Value: 0
      • Units: deg per rotation
    • GyroScalarY

      public double GyroScalarY
      The gyro scalar component for the Y axis.
      • Minimum Value: -180
      • Maximum Value: 180
      • Default Value: 0
      • Units: deg per rotation
    • GyroScalarZ

      public double GyroScalarZ
      The gyro scalar component for the Z axis.
      • Minimum Value: -180
      • Maximum Value: 180
      • Default Value: 0
      • Units: deg per rotation
  • Constructor Details

  • Method Details

    • withGyroScalarX

      public final GyroTrimConfigs withGyroScalarX(double newGyroScalarX)
      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

      public final GyroTrimConfigs withGyroScalarY(double newGyroScalarY)
      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

      public final GyroTrimConfigs withGyroScalarZ(double newGyroScalarZ)
      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

      public String toString()
      Overrides:
      toString in class Object
    • serialize

      public final String serialize()
      Get the serialized form of this configuration group.
      Specified by:
      serialize in interface ISerializable
      Returns:
      Serialized form of this config group
    • deserialize

      public final StatusCode deserialize(String to_deserialize)
      Take a string and deserialize it to this configuration group.
      Specified by:
      deserialize in interface ParentConfiguration
      Returns:
      Return code of the deserialize method
    • clone

      Overrides:
      clone in class Object