CTRE Phoenix 6 C++ 25.2.1
|
The relationship between the motor controlled by a Talon and the external sensor connected to the data port. More...
#include <ctre/phoenix6/signals/SpnEnums.hpp>
Public Member Functions | |
constexpr | SensorPhaseValue (int value) |
constexpr | SensorPhaseValue () |
constexpr bool | operator== (SensorPhaseValue data) const |
constexpr bool | operator== (int data) const |
constexpr bool | operator!= (SensorPhaseValue data) const |
constexpr bool | operator!= (int data) const |
constexpr bool | operator< (SensorPhaseValue 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 | Aligned = 0 |
The sensor direction is normally aligned with the motor. | |
static constexpr int | Opposed = 1 |
The sensor direction is normally opposed to the motor. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, SensorPhaseValue data) |
The relationship between the motor controlled by a Talon and the external sensor connected to the data port.
This does not affect the commutation sensor or remote sensors.
To determine the sensor phase, set this config to Aligned and drive the motor with positive output. If the reported sensor velocity is positive, then the phase is Aligned. If the reported sensor velocity is negative, then the phase is Opposed.
The sensor direction is automatically inverted along with motor invert, so the sensor phase does not need to be changed when motor invert changes.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinevirtual |
Implements ctre::phoenix6::ISerializable.
|
inline |
Gets the string representation of this enum.
|
friend |
|
staticconstexpr |
The sensor direction is normally aligned with the motor.
|
staticconstexpr |
The sensor direction is normally opposed to the motor.
int ctre::phoenix6::signals::SensorPhaseValue::value |