CTRE Phoenix 6 C++ 25.2.1
Loading...
Searching...
No Matches
ctre::phoenix6::configs::ClosedLoopGeneralConfigs Class Reference

Configs that affect general behavior during closed-looping. More...

#include <ctre/phoenix6/configs/Configs.hpp>

Inheritance diagram for ctre::phoenix6::configs::ClosedLoopGeneralConfigs:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

constexpr ClosedLoopGeneralConfigs ()=default
 
constexpr ClosedLoopGeneralConfigsWithContinuousWrap (bool newContinuousWrap)
 Modifies this configuration's ContinuousWrap parameter and returns itself for method-chaining and easier to use config API.
 
std::string ToString () const override
 
std::string Serialize () const override
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize) override
 
- Public Member Functions inherited from ctre::phoenix6::configs::ParentConfiguration
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

bool ContinuousWrap = false
 Wrap position error within [-0.5,+0.5) mechanism rotations.
 

Detailed Description

Configs that affect general behavior during closed-looping.

Includes Continuous Wrap features.

Constructor & Destructor Documentation

◆ ClosedLoopGeneralConfigs()

ctre::phoenix6::configs::ClosedLoopGeneralConfigs::ClosedLoopGeneralConfigs ( )
constexprdefault

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::ClosedLoopGeneralConfigs::Deserialize ( const std::string & to_deserialize)
inlineoverridevirtual

◆ Serialize()

std::string ctre::phoenix6::configs::ClosedLoopGeneralConfigs::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string ctre::phoenix6::configs::ClosedLoopGeneralConfigs::ToString ( ) const
inlineoverridevirtual

◆ WithContinuousWrap()

ClosedLoopGeneralConfigs & ctre::phoenix6::configs::ClosedLoopGeneralConfigs::WithContinuousWrap ( bool newContinuousWrap)
inlineconstexpr

Modifies this configuration's ContinuousWrap parameter and returns itself for method-chaining and easier to use config API.

Wrap position error within [-0.5,+0.5) mechanism rotations. Typically used for continuous position closed-loops like swerve azimuth.

This uses the mechanism rotation value. If there is a gear ratio between the sensor and the mechanism, make sure to apply a SensorToMechanismRatio so the closed loop operates on the full rotation.

  • Default Value: False
Parameters
newContinuousWrapParameter to modify
Returns
Itself

Member Data Documentation

◆ ContinuousWrap

bool ctre::phoenix6::configs::ClosedLoopGeneralConfigs::ContinuousWrap = false

Wrap position error within [-0.5,+0.5) mechanism rotations.

Typically used for continuous position closed-loops like swerve azimuth.

This uses the mechanism rotation value. If there is a gear ratio between the sensor and the mechanism, make sure to apply a SensorToMechanismRatio so the closed loop operates on the full rotation.

  • Default Value: False

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