CTRE Phoenix 6 C++ 25.2.2
Loading...
Searching...
No Matches
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.
 
std::string Serialize () const
 
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

int value
 

Static Public Attributes

static constexpr int UseVelocitySign = 0
 Use the velocity reference sign.
 
static constexpr int UseClosedLoopSign = 1
 Use the sign of closed loop error.
 

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 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.

Constructor & Destructor Documentation

◆ StaticFeedforwardSignValue() [1/2]

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

◆ StaticFeedforwardSignValue() [2/2]

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

Member Function Documentation

◆ operator!=() [1/2]

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

◆ operator!=() [2/2]

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

◆ operator<() [1/2]

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

◆ operator<() [2/2]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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 Symbol Documentation

◆ operator<<

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

Member Data Documentation

◆ UseClosedLoopSign

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

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.

◆ UseVelocitySign

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

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).

◆ value

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

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