Enum Class StaticFeedforwardSignValue

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

Static Feedforward Sign during position closed loop.

This determines the sign of the applied kS during position closed-loop modes. The default behavior uses the velocity reference sign. This works well with velocity closed loop, Motion MagicĀ® controls, and position closed loop when velocity reference is specified (motion profiling).

However, when using position closed loop with zero velocity reference (no motion profiling), the application may want to apply static feedforward based on the sign of closed loop error instead. When doing so, we recommend using the minimal amount of kS, otherwise the motor output may dither when closed loop error is near zero.

  • Enum Constant Details

    • UseVelocitySign

      Use the velocity reference sign. This works well with velocity closed loop, Motion MagicĀ® controls, and position closed loop when velocity reference is specified (motion profiling).
    • UseClosedLoopSign

      Use the sign of closed loop error. This is useful when using position closed loop with zero velocity reference (no motion profiling). We recommend the minimal amount of kS, otherwise the motor output may dither when closed loop error is near zero.
  • Field Details

    • value

      public final int value
  • Method Details

    • 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

      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 StaticFeedforwardSignValue valueOf(int value)
      Gets StaticFeedforwardSignValue from specified value
      Parameters:
      value - Value of StaticFeedforwardSignValue
      Returns:
      StaticFeedforwardSignValue of specified value