CTRE Phoenix Pro C++ 23.0.12
ctre::phoenixpro::configs::MagnetSensorConfigs Class Reference

Configs that affect the magnet sensor and how to interpret it. More...

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

Inheritance diagram for ctre::phoenixpro::configs::MagnetSensorConfigs:
ctre::phoenixpro::configs::ParentConfiguration ctre::phoenixpro::ISerializable

Public Member Functions

std::string ToString () const
 
std::string Serialize () const
 
ctre::phoenix::StatusCode Deserialize (const std::string &string)
 
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 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::Unsigned_0To1
 The range of the absolute sensor, either [0, 1) or [-0.5, 0.5). More...
 

Detailed Description

Configs that affect the magnet sensor and how to interpret it.

Includes sensor range and other configs related to sensor.

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenixpro::configs::MagnetSensorConfigs::Deserialize ( const std::string &  string)
inlinevirtual

◆ Serialize()

std::string ctre::phoenixpro::configs::MagnetSensorConfigs::Serialize ( ) const
inlinevirtual

◆ ToString()

std::string ctre::phoenixpro::configs::MagnetSensorConfigs::ToString ( ) const
inlinevirtual

Member Data Documentation

◆ AbsoluteSensorRange

signals::AbsoluteSensorRangeValue ctre::phoenixpro::configs::MagnetSensorConfigs::AbsoluteSensorRange = signals::AbsoluteSensorRangeValue::Unsigned_0To1

The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).

◆ MagnetOffset

double ctre::phoenixpro::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.

Minimum Value: -1 Maximum Value: 1 Default Value: 0 Units: rotations

◆ SensorDirection

signals::SensorDirectionValue ctre::phoenixpro::configs::MagnetSensorConfigs::SensorDirection = signals::SensorDirectionValue::CounterClockwise_Positive

Direction of the sensor to determine positive facing the LED side of the CANcoder.


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