phoenix6.hardware.candle¶
Module Contents¶
- class phoenix6.hardware.candle.CANdle(device_id: int, canbus: phoenix6.canbus.CANBus | str = CANBus())¶
Bases:
phoenix6.hardware.core.core_candle.CoreCANdle,wpiutil.SendableClass for CTR Electronics’ CANdle® branded device, a device that controls LEDs over the CAN bus.
Constructs a new CANdle object.
Changed in version 2026: Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. Construct devices using a CANBus instance instead.
- Parameters:
device_id (int) – ID of the device, as configured in Phoenix Tuner
canbus (CANBus | str, optional) –
The CAN bus this device is on. Possible CAN bus strings are:
”rio” for the native roboRIO CAN bus
CANivore name or serial number
SocketCAN interface (non-FRC Linux only)
”*” for any CANivore seen by the program
empty string (default) to select the default for the system:
”rio” on roboRIO
”can0” on Linux
”*” on Windows
- ANIM_SLOT_COUNT: int = '8'¶
The number of animation slots.
- classmethod none()¶
Constructs a stubbed-out CANdle, where all status signals, controls, configs, etc. perform no action and immediately return OK. This can be used to silence error messages for devices that have been completely removed from the robot.
- Returns:
Stubbed-out CANdle
- Return type:
- close()¶
- clear_all_animations() phoenix6.status_code.StatusCode¶
Clears all animations on the CANdle. This is equivalent to applying an EmptyAnimation to all the animation slots on the CANdle.
- Returns:
Status code of the first failed control call, or OK if all succeeded
- Return type:
- initSendable(builder: wpiutil.SendableBuilder)¶
Initializes this Sendable object.
- Parameters:
builder – sendable builder