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 rotation
    double GyroScalarY
    The gyro scalar component for the Y axis Minimum Value: -180 Maximum Value: 180 Default Value: 0 Units: deg per rotation
    double 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 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 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 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
    • deserialize

      public StatusCode deserialize​(String to_deserialize)
      Specified by:
      deserialize in interface ParentConfiguration
    • serialize

      public String serialize()
      Specified by:
      serialize in interface ISerializable