Class for CTR Electronics' CANdle® branded device, a device that controls LEDs over the CAN bus. More...
#include <ctre/phoenix6/core/CoreCANdle.hpp>
Public Member Functions | |
constexpr | CANdleConfiguration ()=default |
constexpr CANdleConfiguration & | WithCustomParams (CustomParamsConfigs newCustomParams) |
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API. | |
constexpr CANdleConfiguration & | WithLED (LEDConfigs newLED) |
Modifies this configuration's LED parameter and returns itself for method-chaining and easier to use config API. | |
constexpr CANdleConfiguration & | WithCANdleFeatures (CANdleFeaturesConfigs newCANdleFeatures) |
Modifies this configuration's CANdleFeatures 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. | |
LEDConfigs | LED |
Configs related to CANdle LED control. | |
CANdleFeaturesConfigs | CANdleFeatures |
Configs related to general CANdle features. | |
Class for CTR Electronics' CANdle® branded device, a device that controls LEDs over the CAN bus.
This handles the configurations for the hardware::CANdle
|
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 CANdleFeatures parameter and returns itself for method-chaining and easier to use config API.
Configs related to general CANdle features.
This includes configs such as disabling the 5V rail and the behavior of VBat output.
Parameter list:
newCANdleFeatures | Parameter to modify |
|
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.
Parameter list:
newCustomParams | Parameter to modify |
|
inlineconstexpr |
Modifies this configuration's LED parameter and returns itself for method-chaining and easier to use config API.
Configs related to CANdle LED control.
All the configs related to controlling LEDs with the CANdle, including LED strip type and brightness.
Parameter list:
newLED | Parameter to modify |
CANdleFeaturesConfigs ctre::phoenix6::configs::CANdleConfiguration::CANdleFeatures |
Configs related to general CANdle features.
This includes configs such as disabling the 5V rail and the behavior of VBat output.
Parameter list:
CustomParamsConfigs ctre::phoenix6::configs::CANdleConfiguration::CustomParams |
Custom Params.
Custom paramaters that have no real impact on controller.
Parameter list:
bool ctre::phoenix6::configs::CANdleConfiguration::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.
LEDConfigs ctre::phoenix6::configs::CANdleConfiguration::LED |
Configs related to CANdle LED control.
All the configs related to controlling LEDs with the CANdle, including LED strip type and brightness.
Parameter list: