Loading [MathJax]/extensions/MathZoom.js
CTRE Phoenix 6 C++ 25.4.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ctre::phoenix6::configs::LEDConfigs Class Reference

Configs related to CANdle LED control. More...

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

Inheritance diagram for ctre::phoenix6::configs::LEDConfigs:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

constexpr LEDConfigs ()=default
 
constexpr LEDConfigsWithStripType (signals::StripTypeValue newStripType)
 Modifies this configuration's StripType parameter and returns itself for method-chaining and easier to use config API.
 
constexpr LEDConfigsWithBrightnessScalar (units::dimensionless::scalar_t newBrightnessScalar)
 Modifies this configuration's BrightnessScalar parameter and returns itself for method-chaining and easier to use config API.
 
constexpr LEDConfigsWithLossOfSignalBehavior (signals::LossOfSignalBehaviorValue newLossOfSignalBehavior)
 Modifies this configuration's LossOfSignalBehavior parameter and returns itself for method-chaining and easier to use config API.
 
std::string ToString () const override
 
std::string Serialize () const override
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize) override
 
- Public Member Functions inherited from ctre::phoenix6::configs::ParentConfiguration
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

signals::StripTypeValue StripType = signals::StripTypeValue::GRB
 The type of LEDs that are being controlled.
 
units::dimensionless::scalar_t BrightnessScalar = 1.0
 The brightness scalar for all LEDs controlled.
 
signals::LossOfSignalBehaviorValue LossOfSignalBehavior = signals::LossOfSignalBehaviorValue::KeepRunning
 The behavior of the LEDs when the control signal is lost.
 

Detailed Description

Configs related to CANdle LED control.

All the configs related to controlling LEDs with the CANdle, including LED strip type and brightness.

Constructor & Destructor Documentation

◆ LEDConfigs()

ctre::phoenix6::configs::LEDConfigs::LEDConfigs ( )
constexprdefault

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::LEDConfigs::Deserialize ( const std::string & to_deserialize)
inlineoverridevirtual

◆ Serialize()

std::string ctre::phoenix6::configs::LEDConfigs::Serialize ( ) const
inlineoverridevirtual

◆ ToString()

std::string ctre::phoenix6::configs::LEDConfigs::ToString ( ) const
inlineoverridevirtual

◆ WithBrightnessScalar()

LEDConfigs & ctre::phoenix6::configs::LEDConfigs::WithBrightnessScalar ( units::dimensionless::scalar_t newBrightnessScalar)
inlineconstexpr

Modifies this configuration's BrightnessScalar parameter and returns itself for method-chaining and easier to use config API.

The brightness scalar for all LEDs controlled. All LED values sent to the CANdle will be scaled by this config.

  • Minimum Value: 0.0
  • Maximum Value: 1.0
  • Default Value: 1.0
  • Units: scalar
Parameters
newBrightnessScalarParameter to modify
Returns
Itself

◆ WithLossOfSignalBehavior()

LEDConfigs & ctre::phoenix6::configs::LEDConfigs::WithLossOfSignalBehavior ( signals::LossOfSignalBehaviorValue newLossOfSignalBehavior)
inlineconstexpr

Modifies this configuration's LossOfSignalBehavior parameter and returns itself for method-chaining and easier to use config API.

The behavior of the LEDs when the control signal is lost.

Parameters
newLossOfSignalBehaviorParameter to modify
Returns
Itself

◆ WithStripType()

LEDConfigs & ctre::phoenix6::configs::LEDConfigs::WithStripType ( signals::StripTypeValue newStripType)
inlineconstexpr

Modifies this configuration's StripType parameter and returns itself for method-chaining and easier to use config API.

The type of LEDs that are being controlled.

Parameters
newStripTypeParameter to modify
Returns
Itself

Member Data Documentation

◆ BrightnessScalar

units::dimensionless::scalar_t ctre::phoenix6::configs::LEDConfigs::BrightnessScalar = 1.0

The brightness scalar for all LEDs controlled.

All LED values sent to the CANdle will be scaled by this config.

  • Minimum Value: 0.0
  • Maximum Value: 1.0
  • Default Value: 1.0
  • Units: scalar

◆ LossOfSignalBehavior

signals::LossOfSignalBehaviorValue ctre::phoenix6::configs::LEDConfigs::LossOfSignalBehavior = signals::LossOfSignalBehaviorValue::KeepRunning

The behavior of the LEDs when the control signal is lost.

◆ StripType

signals::StripTypeValue ctre::phoenix6::configs::LEDConfigs::StripType = signals::StripTypeValue::GRB

The type of LEDs that are being controlled.


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