Package com.ctre.phoenix6.signals
Enum Class 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse the sign of closed loop error.Use the velocity reference sign. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticFeedforwardSignValue
valueOf
(int value) Gets StaticFeedforwardSignValue from specified valuestatic StaticFeedforwardSignValue
Returns the enum constant of this class with the specified name.static StaticFeedforwardSignValue[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
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
-
-
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 nameNullPointerException
- if the argument is null
-
valueOf
Gets StaticFeedforwardSignValue from specified value- Parameters:
value
- Value of StaticFeedforwardSignValue- Returns:
- StaticFeedforwardSignValue of specified value
-