CTRE Phoenix 6 C++ 24.50.0-alpha-2
ctre::phoenix6::signals::StaticFeedforwardSignValue Class Reference

Static Feedforward Sign during position closed loop. More...

#include <ctre/phoenix6/signals/SpnEnums.hpp>

Inheritance diagram for ctre::phoenix6::signals::StaticFeedforwardSignValue:
ctre::phoenix6::ISerializable

Public Member Functions

constexpr StaticFeedforwardSignValue (int value)
 
constexpr StaticFeedforwardSignValue ()
 
constexpr bool operator== (StaticFeedforwardSignValue data) const
 
constexpr bool operator== (int data) const
 
constexpr bool operator!= (StaticFeedforwardSignValue data) const
 
constexpr bool operator!= (int data) const
 
constexpr bool operator< (StaticFeedforwardSignValue data) const
 
constexpr bool operator< (int data) const
 
std::string ToString () const
 Gets the string representation of this enum. More...
 
std::string Serialize () const
 
virtual std::string Serialize () const =0
 

Public Attributes

int value
 

Static Public Attributes

static constexpr int UseVelocitySign = 0
 
static constexpr int UseClosedLoopSign = 1
 

Friends

std::ostream & operator<< (std::ostream &os, StaticFeedforwardSignValue data)
 

Detailed Description

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 closed loop error sign instead. When doing so, we recommend the minimal amount of kS, otherwise the motor output may dither when closed loop error is near zero.

Constructor & Destructor Documentation

◆ StaticFeedforwardSignValue() [1/2]

constexpr ctre::phoenix6::signals::StaticFeedforwardSignValue::StaticFeedforwardSignValue ( int  value)
inlineconstexpr

◆ StaticFeedforwardSignValue() [2/2]

constexpr ctre::phoenix6::signals::StaticFeedforwardSignValue::StaticFeedforwardSignValue ( )
inlineconstexpr

Member Function Documentation

◆ operator!=() [1/2]

constexpr bool ctre::phoenix6::signals::StaticFeedforwardSignValue::operator!= ( int  data) const
inlineconstexpr

◆ operator!=() [2/2]

constexpr bool ctre::phoenix6::signals::StaticFeedforwardSignValue::operator!= ( StaticFeedforwardSignValue  data) const
inlineconstexpr

◆ operator<() [1/2]

constexpr bool ctre::phoenix6::signals::StaticFeedforwardSignValue::operator< ( int  data) const
inlineconstexpr

◆ operator<() [2/2]

constexpr bool ctre::phoenix6::signals::StaticFeedforwardSignValue::operator< ( StaticFeedforwardSignValue  data) const
inlineconstexpr

◆ operator==() [1/2]

constexpr bool ctre::phoenix6::signals::StaticFeedforwardSignValue::operator== ( int  data) const
inlineconstexpr

◆ operator==() [2/2]

constexpr bool ctre::phoenix6::signals::StaticFeedforwardSignValue::operator== ( StaticFeedforwardSignValue  data) const
inlineconstexpr

◆ Serialize()

std::string ctre::phoenix6::signals::StaticFeedforwardSignValue::Serialize ( ) const
inlinevirtual

◆ ToString()

std::string ctre::phoenix6::signals::StaticFeedforwardSignValue::ToString ( ) const
inline

Gets the string representation of this enum.

Returns
String representation of this enum

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
StaticFeedforwardSignValue  data 
)
friend

Member Data Documentation

◆ UseClosedLoopSign

constexpr int ctre::phoenix6::signals::StaticFeedforwardSignValue::UseClosedLoopSign = 1
staticconstexpr

◆ UseVelocitySign

constexpr int ctre::phoenix6::signals::StaticFeedforwardSignValue::UseVelocitySign = 0
staticconstexpr

◆ value

int ctre::phoenix6::signals::StaticFeedforwardSignValue::value

The documentation for this class was generated from the following file: