Enum Class GravityTypeValue

java.lang.Object
java.lang.Enum<GravityTypeValue>
com.ctre.phoenix6.signals.GravityTypeValue
All Implemented Interfaces:
Serializable, Comparable<GravityTypeValue>, java.lang.constant.Constable

Gravity Feedforward/Feedback Type.

This determines the type of the gravity feedforward/feedback.

Choose Elevator_Static for systems where the gravity feedforward is constant, such as an elevator. The gravity feedforward output will always have the same sign.

Choose Arm_Cosine for systems where the gravity feedback is dependent on the angular position of the mechanism, such as an arm. The gravity feedback output will vary depending on the mechanism angular position. Note that the sensor offset and ratios must be configured so that the sensor reports a position of 0 when the mechanism is horizonal (parallel to the ground), and the reported sensor position is 1:1 with the mechanism.

  • Enum Constant Details

    • Elevator_Static

      public static final GravityTypeValue Elevator_Static
      The system's gravity feedforward is constant, such as an elevator. The gravity feedforward output will always have the same sign.
    • Arm_Cosine

      public static final GravityTypeValue Arm_Cosine
      The system's gravity feedback is dependent on the angular position of the mechanism, such as an arm. The gravity feedback output will vary depending on the mechanism angular position. Note that the sensor offset and ratios must be configured so that the sensor reports a position of 0 when the mechanism is horizonal (parallel to the ground), and the reported sensor position is 1:1 with the mechanism.
  • Field Details

    • value

      public final int value
  • Method Details

    • values

      public static GravityTypeValue[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GravityTypeValue valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static GravityTypeValue valueOf(int value)
      Gets GravityTypeValue from specified value
      Parameters:
      value - Value of GravityTypeValue
      Returns:
      GravityTypeValue of specified value