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

Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along with filtered velocity. More...

#include <ctre/phoenixpro/core/CoreCANcoder.hpp>

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

Public Member Functions

std::string ToString () const
 Get the string representation of this configuration. More...
 
std::string Serialize () const
 Get the serialized form of this configuration. More...
 
ctre::phoenix::StatusCode Deserialize (const std::string &string)
 Take a string and deserialize it to this configuration. More...
 
virtual std::string ToString () const =0
 
virtual ctre::phoenix::StatusCode Deserialize (const std::string &string)=0
 
virtual std::string Serialize () const =0
 

Public Attributes

bool FutureProofConfigs {true}
 True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone. More...
 
MagnetSensorConfigs MagnetSensor
 Configs that affect the magnet sensor and how to interpret it. More...
 

Detailed Description

Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along with filtered velocity.

This handles the configurations for the hardware::CANcoder

Member Function Documentation

◆ Deserialize()

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

Take a string and deserialize it to this configuration.

Implements ctre::phoenixpro::configs::ParentConfiguration.

◆ Serialize()

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

Get the serialized form of this configuration.

Implements ctre::phoenixpro::ISerializable.

◆ ToString()

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

Get the string representation of this configuration.

Implements ctre::phoenixpro::configs::ParentConfiguration.

Member Data Documentation

◆ FutureProofConfigs

bool ctre::phoenixpro::configs::CANcoderConfiguration::FutureProofConfigs {true}

True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.

This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.

This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.

◆ MagnetSensor

MagnetSensorConfigs ctre::phoenixpro::configs::CANcoderConfiguration::MagnetSensor

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

Includes sensor range and other configs related to sensor.


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