CTRE Phoenix 6 C++ 25.0.0-beta-4
|
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front of the device. More...
#include <ctre/phoenix6/core/CoreCANrange.hpp>
Public Member Functions | |
constexpr | CANrangeConfiguration ()=default |
constexpr CANrangeConfiguration & | WithCustomParams (CustomParamsConfigs newCustomParams) |
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API. | |
constexpr CANrangeConfiguration & | WithToFParams (ToFParamsConfigs newToFParams) |
Modifies this configuration's ToFParams parameter and returns itself for method-chaining and easier to use config API. | |
constexpr CANrangeConfiguration & | WithProximityParams (ProximityParamsConfigs newProximityParams) |
Modifies this configuration's ProximityParams parameter and returns itself for method-chaining and easier to use config API. | |
constexpr CANrangeConfiguration & | WithFovParams (FovParamsConfigs newFovParams) |
Modifies this configuration's FovParams parameter and returns itself for method-chaining and easier to use config API. | |
std::string | ToString () const |
Get the string representation of this configuration. | |
std::string | Serialize () const |
Get the serialized form of this configuration. | |
ctre::phoenix::StatusCode | Deserialize (const std::string &to_deserialize) |
Take a string and deserialize it to this configuration. | |
Public Attributes | |
bool | FutureProofConfigs {true} |
True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone. | |
CustomParamsConfigs | CustomParams |
Custom Params. | |
ToFParamsConfigs | ToFParams |
Configs that affect the ToF sensor. | |
ProximityParamsConfigs | ProximityParams |
Configs that affect the ToF Proximity detection. | |
FovParamsConfigs | FovParams |
Configs that affect the ToF Field of View. | |
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front of the device.
This handles the configurations for the hardware::CANrange
|
constexprdefault |
|
inlinevirtual |
Take a string and deserialize it to this configuration.
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlinevirtual |
Get the serialized form of this configuration.
Implements ctre::phoenix6::ISerializable.
|
inlinevirtual |
Get the string representation of this configuration.
Implements ctre::phoenix6::configs::ParentConfiguration.
|
inlineconstexpr |
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.
Custom Params.
Custom paramaters that have no real impact on controller.
newCustomParams | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's FovParams parameter and returns itself for method-chaining and easier to use config API.
Configs that affect the ToF Field of View
Includes range and center configs
newFovParams | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's ProximityParams parameter and returns itself for method-chaining and easier to use config API.
Configs that affect the ToF Proximity detection
Includes proximity mode and the threshold for simple detection
newProximityParams | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's ToFParams parameter and returns itself for method-chaining and easier to use config API.
Configs that affect the ToF sensor
Includes Update mode and frequency
newToFParams | Parameter to modify |
CustomParamsConfigs ctre::phoenix6::configs::CANrangeConfiguration::CustomParams |
Custom Params.
Custom paramaters that have no real impact on controller.
FovParamsConfigs ctre::phoenix6::configs::CANrangeConfiguration::FovParams |
Configs that affect the ToF Field of View.
Includes range and center configs
bool ctre::phoenix6::configs::CANrangeConfiguration::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.
ProximityParamsConfigs ctre::phoenix6::configs::CANrangeConfiguration::ProximityParams |
Configs that affect the ToF Proximity detection.
Includes proximity mode and the threshold for simple detection
ToFParamsConfigs ctre::phoenix6::configs::CANrangeConfiguration::ToFParams |
Configs that affect the ToF sensor.
Includes Update mode and frequency