CTRE Phoenix 6 C++ 26.3.0
Loading...
Searching...
No Matches
ctre::phoenix6::signals::GravityTypeValue Struct Reference

Gravity feedforward/feedback type. More...

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

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

Public Member Functions

constexpr GravityTypeValue (int value)
 
constexpr GravityTypeValue ()
 
constexpr bool operator== (GravityTypeValue other) const
 
constexpr auto operator<=> (GravityTypeValue other) const
 
constexpr std::string_view ToString () const
 Gets the string representation of this enum.
 
std::string Serialize () const override
 
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

int value
 

Static Public Attributes

static constexpr int Elevator_Static = 0
 The system's gravity feedforward is constant, such as an elevator.
 
static constexpr int Arm_Cosine = 1
 The system's gravity feedback is dependent on the angular position of the mechanism, such as an arm.
 

Friends

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

Detailed Description

Gravity feedforward/feedback type.

  This determines the type of the gravity feedforward/feedback.

  Choose Elevator_Static for systems where the gravity feedforward is
  constant, such as an elevator. The gravity feedforward output will
  always have the same sign.

  Choose Arm_Cosine for systems where the gravity feedback is dependent
  on the angular position of the mechanism, such as an arm. The gravity
  feedback output will vary depending on the mechanism angular position.
  Note that the sensor offset and ratios must be configured so that the
  sensor reports a position of 0 when the mechanism is horizonal
  (parallel to the ground), and the reported sensor position is 1:1 with
  the mechanism.

Constructor & Destructor Documentation

◆ GravityTypeValue() [1/2]

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

◆ GravityTypeValue() [2/2]

ctre::phoenix6::signals::GravityTypeValue::GravityTypeValue ( )
inlineconstexpr

Member Function Documentation

◆ operator<=>()

auto ctre::phoenix6::signals::GravityTypeValue::operator<=> ( GravityTypeValue other) const
inlineconstexpr

◆ operator==()

bool ctre::phoenix6::signals::GravityTypeValue::operator== ( GravityTypeValue other) const
inlineconstexpr

◆ Serialize()

std::string ctre::phoenix6::signals::GravityTypeValue::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string_view ctre::phoenix6::signals::GravityTypeValue::ToString ( ) const
inlineconstexpr

Gets the string representation of this enum.

Returns
String representation of this enum

Friends And Related Symbol Documentation

◆ operator<<

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

Member Data Documentation

◆ Arm_Cosine

int ctre::phoenix6::signals::GravityTypeValue::Arm_Cosine = 1
staticconstexpr

The system's gravity feedback is dependent on the angular position of the mechanism, such as an arm.

The gravity feedback output will vary depending on the mechanism angular position. Note that the sensor offset and ratios must be configured so that the sensor reports a position of 0 when the mechanism is horizonal (parallel to the ground), and the reported sensor position is 1:1 with the mechanism.

◆ Elevator_Static

int ctre::phoenix6::signals::GravityTypeValue::Elevator_Static = 0
staticconstexpr

The system's gravity feedforward is constant, such as an elevator.

The gravity feedforward output will always have the same sign.

◆ value

int ctre::phoenix6::signals::GravityTypeValue::value

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