CTRE Phoenix 6 C++ 24.3.0
|
Configs that affect the magnet sensor and how to interpret it. More...
#include <ctre/phoenix6/configs/Configs.hpp>
Public Member Functions | |
MagnetSensorConfigs & | WithSensorDirection (signals::SensorDirectionValue newSensorDirection) |
Modifies this configuration's SensorDirection parameter and returns itself for method-chaining and easier to use config API. More... | |
MagnetSensorConfigs & | WithMagnetOffset (double newMagnetOffset) |
Modifies this configuration's MagnetOffset parameter and returns itself for method-chaining and easier to use config API. More... | |
MagnetSensorConfigs & | WithAbsoluteSensorRange (signals::AbsoluteSensorRangeValue newAbsoluteSensorRange) |
Modifies this configuration's AbsoluteSensorRange parameter and returns itself for method-chaining and easier to use config API. More... | |
std::string | ToString () const override |
std::string | Serialize () const override |
ctre::phoenix::StatusCode | Deserialize (const std::string &to_deserialize) override |
virtual std::string | ToString () const =0 |
virtual ctre::phoenix::StatusCode | Deserialize (const std::string &string)=0 |
virtual std::string | Serialize () const =0 |
Public Attributes | |
signals::SensorDirectionValue | SensorDirection = signals::SensorDirectionValue::CounterClockwise_Positive |
Direction of the sensor to determine positive rotation, as seen facing the LED side of the CANcoder. More... | |
double | MagnetOffset = 0 |
This offset is added to the reported position, allowing the application to trim the zero position. More... | |
signals::AbsoluteSensorRangeValue | AbsoluteSensorRange = signals::AbsoluteSensorRangeValue::Signed_PlusMinusHalf |
The range of the absolute sensor in rotations, either [-0.5, 0.5) or [0, 1). More... | |
Configs that affect the magnet sensor and how to interpret it.
Includes sensor range, sensor direction, and the magnet offset.
|
inlineoverridevirtual |
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlineoverridevirtual |
Implements ctre::phoenix6::ISerializable.
|
inlineoverridevirtual |
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inline |
Modifies this configuration's AbsoluteSensorRange parameter and returns itself for method-chaining and easier to use config API.
The range of the absolute sensor in rotations, either [-0.5, 0.5) or [0, 1).
newAbsoluteSensorRange | Parameter to modify |
|
inline |
Modifies this configuration's MagnetOffset parameter and returns itself for method-chaining and easier to use config API.
This offset is added to the reported position, allowing the application to trim the zero position. When set to the default value of zero, position reports zero when magnet north pole aligns with the LED.
newMagnetOffset | Parameter to modify |
|
inline |
Modifies this configuration's SensorDirection parameter and returns itself for method-chaining and easier to use config API.
Direction of the sensor to determine positive rotation, as seen facing the LED side of the CANcoder.
newSensorDirection | Parameter to modify |
signals::AbsoluteSensorRangeValue ctre::phoenix6::configs::MagnetSensorConfigs::AbsoluteSensorRange = signals::AbsoluteSensorRangeValue::Signed_PlusMinusHalf |
The range of the absolute sensor in rotations, either [-0.5, 0.5) or [0, 1).
double ctre::phoenix6::configs::MagnetSensorConfigs::MagnetOffset = 0 |
This offset is added to the reported position, allowing the application to trim the zero position.
When set to the default value of zero, position reports zero when magnet north pole aligns with the LED.
signals::SensorDirectionValue ctre::phoenix6::configs::MagnetSensorConfigs::SensorDirection = signals::SensorDirectionValue::CounterClockwise_Positive |
Direction of the sensor to determine positive rotation, as seen facing the LED side of the CANcoder.