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

Configs that determine motor selection and commutation. More...

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

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

Public Member Functions

constexpr CommutationConfigs ()=default
 
constexpr CommutationConfigsWithAdvancedHallSupport (signals::AdvancedHallSupportValue newAdvancedHallSupport)
 Modifies this configuration's AdvancedHallSupport parameter and returns itself for method-chaining and easier to use config API.
 
constexpr CommutationConfigsWithMotorArrangement (signals::MotorArrangementValue newMotorArrangement)
 Modifies this configuration's MotorArrangement parameter and returns itself for method-chaining and easier to use config API.
 
constexpr CommutationConfigsWithBrushedMotorWiring (signals::BrushedMotorWiringValue newBrushedMotorWiring)
 Modifies this configuration's BrushedMotorWiring 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

signals::AdvancedHallSupportValue AdvancedHallSupport = signals::AdvancedHallSupportValue::Disabled
 Requires Phoenix Pro; Improves commutation and velocity measurement for motors with hall sensors.
 
signals::MotorArrangementValue MotorArrangement = signals::MotorArrangementValue::Disabled
 Selects the motor and motor connections used with Talon.
 
signals::BrushedMotorWiringValue BrushedMotorWiring = signals::BrushedMotorWiringValue::Leads_A_and_B
 If a brushed motor is selected with Motor Arrangement, this config determines which of three leads to use.
 

Detailed Description

Configs that determine motor selection and commutation.

Set these configs to match your motor setup before commanding motor output.

Constructor & Destructor Documentation

◆ CommutationConfigs()

ctre::phoenix6::configs::CommutationConfigs::CommutationConfigs ( )
constexprdefault

Member Function Documentation

◆ Deserialize()

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

◆ Serialize()

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

◆ ToString()

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

◆ WithAdvancedHallSupport()

CommutationConfigs & ctre::phoenix6::configs::CommutationConfigs::WithAdvancedHallSupport ( signals::AdvancedHallSupportValue newAdvancedHallSupport)
inlineconstexpr

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

Requires Phoenix Pro; Improves commutation and velocity measurement for motors with hall sensors. Talon can use advanced features to improve commutation and velocity measurement when using a motor with hall sensors. This can improve peak efficiency by as high as 2% and reduce noise in the measured velocity.

Parameters
newAdvancedHallSupportParameter to modify
Returns
Itself

◆ WithBrushedMotorWiring()

CommutationConfigs & ctre::phoenix6::configs::CommutationConfigs::WithBrushedMotorWiring ( signals::BrushedMotorWiringValue newBrushedMotorWiring)
inlineconstexpr

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

If a brushed motor is selected with Motor Arrangement, this config determines which of three leads to use.

Parameters
newBrushedMotorWiringParameter to modify
Returns
Itself

◆ WithMotorArrangement()

CommutationConfigs & ctre::phoenix6::configs::CommutationConfigs::WithMotorArrangement ( signals::MotorArrangementValue newMotorArrangement)
inlineconstexpr

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

Selects the motor and motor connections used with Talon.

This setting determines what kind of motor and sensors are used with the Talon. This also determines what signals are used on the JST and Gadgeteer port.

Motor drive will not function correctly if this setting does not match the physical setup.

Parameters
newMotorArrangementParameter to modify
Returns
Itself

Member Data Documentation

◆ AdvancedHallSupport

signals::AdvancedHallSupportValue ctre::phoenix6::configs::CommutationConfigs::AdvancedHallSupport = signals::AdvancedHallSupportValue::Disabled

Requires Phoenix Pro; Improves commutation and velocity measurement for motors with hall sensors.

Talon can use advanced features to improve commutation and velocity measurement when using a motor with hall sensors. This can improve peak efficiency by as high as 2% and reduce noise in the measured velocity.

◆ BrushedMotorWiring

signals::BrushedMotorWiringValue ctre::phoenix6::configs::CommutationConfigs::BrushedMotorWiring = signals::BrushedMotorWiringValue::Leads_A_and_B

If a brushed motor is selected with Motor Arrangement, this config determines which of three leads to use.

◆ MotorArrangement

signals::MotorArrangementValue ctre::phoenix6::configs::CommutationConfigs::MotorArrangement = signals::MotorArrangementValue::Disabled

Selects the motor and motor connections used with Talon.

This setting determines what kind of motor and sensors are used with the Talon. This also determines what signals are used on the JST and Gadgeteer port.

Motor drive will not function correctly if this setting does not match the physical setup.


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