18namespace ctre{
namespace phoenix{
namespace led{
65 CANdle(
int deviceId, std::string
const &canbus =
"");
The base class for all animations that CANdle supports.
Definition: Animation.h:14
The base class for one generic type of animation.
Definition: BaseStandardAnimation.h:12
The base class for one generic type of animation.
Definition: BaseTwoSizeAnimation.h:12
CTRE CANdle.
Definition: CANdle.h:50
ErrorCode GetStickyFaults(CANdleStickyFaults &toFill)
Gets the CANdle sticky fault status.
ErrorCode ClearStickyFaults(int timeoutMs=0)
Clears the sticky faults.
ErrorCode ConfigLOSBehavior(bool disableWhenLOS, int timeoutMs=0)
Configures what the CANdle should do if it loses communications to the Controller.
ErrorCode ConfigSetCustomParam(int paramIndex, int value, int timeoutMs=0)
Sets the value of a custom parameter.
int ConfigGetCustomParam(int paramIndex, int timeoutMs=0)
Gets the value of a custom parameter.
ctre::phoenix::ErrorCode Animate(Animation &animation, int animSlot=0)
Animates the CANdle with the passed-in animation If the animation changes after calling this function...
double GetCurrent()
Gets the low-side current as measured by CANdle.
ErrorCode ConfigVBatOutput(VBatOutputMode mode, int timeoutMs=0)
Configures how the VBat Output will behave.
ErrorCode SetStatusFramePeriod(CANdleStatusFrame frame, int periodMs, int timeoutMs=0)
Sets the period of the given status frame.
double GetBusVoltage()
Gets the Voltage of VBat as measured by CANdle.
ErrorCode ConfigAllSettings(CANdleConfiguration allConfigs, int timeoutMs=50)
Configures all persistent settings.
ErrorCode ConfigSetParameter(ParamEnum param, double value, int subValue=0, int ordinal=0, int timeoutMs=0)
Sets a parameter.
ErrorCode ConfigLEDType(LEDStripType type, int timeoutMs=0)
Configures the type of LED the CANdle controls.
ErrorCode ConfigFactoryDefault(int timeoutMs=50)
Configures all persistent settings to defaults.
ErrorCode GetFaults(CANdleFaults &toFill)
Gets the CANdle fault status.
ErrorCode ModulateVBatOutput(double dutyCyclePrcnt)
Modulates the VBat output to the specified duty cycle percentage This function will only do something...
ErrorCode configV5Enabled(bool v5Enabled, int timeoutMs=0)
Configures the enable state for the 5V rail.
int GetStatusFramePeriod(CANdleStatusFrame frame, int timeoutMs=0)
Gets the period of the given status frame.
void GetAllConfigs(CANdleConfiguration allConfigs, int timeoutMs=50)
Gets all persistant settings.
double Get5VRailVoltage()
Gets the Voltage of the 5V line as measured by CANdle.
ctre::phoenix::ErrorCode ClearAnimation(int animSlot)
Clears the animation occurring in the selected selected animSlot.
int GetMaxSimultaneousAnimationCount()
Gets the maximum number of simultaneous animations this version of CANdle firmware supports.
ErrorCode ConfigBrightnessScalar(double brightness, int timeoutMs=0)
Configures the brightness scalar to be applied to every LED output.
ErrorCode GetLastError()
Call GetLastError() generated by this object.
ctre::phoenix::ErrorCode SetLEDs(int r, int g, int b, int w=0, int startIdx=0, int count=512)
Sets a block of LEDs to the specified color.
bool HasResetOccurred()
Returns true if the device has reset since last call.
ErrorCode SetControlFramePeriod(CANdleControlFrame frame, int periodMs)
Sets the period of the given control frame.
double GetVBatModulation()
Gets the applied vbat modulation in percent.
CANdle(int deviceId, std::string const &canbus="")
Constructor for a CANdle Device.
ErrorCode ConfigStatusLedState(bool disableWhenRunning, int timeoutMs=0)
Configures how the status led will behave when the CANdle is actively controlling LEDs If the CANdle ...
double GetTemperature()
Gets the temperature of the CANdle in Celcius.
double ConfigGetParameter(ParamEnum param, int ordinal, int timeoutMs=0)
Gets a parameter.
CANdleControlFrame
Enumerated type for status frame types.
Definition: CANdleControlFrame.h:9
LEDStripType
The various LED types that the CANdle can support.
Definition: CANdleLedStripType.h:8
VBatOutputMode
The various methods of managing the VBat output behavior.
Definition: VBatOutputMode.h:9
CANdleStatusFrame
Enumerated type for status frame types.
Definition: CANdleStatusFrame.h:9
ParamEnum
Signal enumeration for generic signal access.
Definition: paramEnum.h:13
ErrorCode
Definition: ErrorCode.h:13
namespace ctre
Definition: paramEnum.h:5
Configurables available to CANdle.
Definition: CANdleConfiguration.h:14
Faults available to CANdle (Currently has none)
Definition: CANdleFaults.h:13
Faults available to CANdle (Currently has none)
Definition: CANdleFaults.h:116