Enum GravityTypeValue

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

public enum GravityTypeValue
extends Enum<GravityTypeValue>
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

  • Field Details

  • Method Details

    • values

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

      public static GravityTypeValue valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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