CTRE Phoenix 6 C++ 24.3.0
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

 StaticFeedforwardSignValue (int value)
 
 StaticFeedforwardSignValue ()
 
std::string ToString () const
 Gets the string representation of this enum. More...
 
std::string Serialize () const
 
bool operator== (const StaticFeedforwardSignValue &data) const
 
bool operator== (int data) const
 
bool operator< (const StaticFeedforwardSignValue &data) const
 
bool operator< (int data) 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, const 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]

ctre::phoenix6::signals::StaticFeedforwardSignValue::StaticFeedforwardSignValue ( int  value)
inline

◆ StaticFeedforwardSignValue() [2/2]

ctre::phoenix6::signals::StaticFeedforwardSignValue::StaticFeedforwardSignValue ( )
inline

Member Function Documentation

◆ operator<() [1/2]

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

◆ operator<() [2/2]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ 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,
const 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: