Class CANdle

All Implemented Interfaces:
PhoenixAlertable, CommonDevice, AutoCloseable

public class CANdle extends CoreCANdle implements AutoCloseable
WPILib-integrated version of CoreCANdle.
  • Field Details

    • kAnimSlotCount

      public static final int kAnimSlotCount
      The number of animation slots.
      See Also:
  • Constructor Details

    • CANdle

      public CANdle(int deviceId, CANBus canbus)
      Constructs a new CANdle object.
      Parameters:
      deviceId - ID of the device, as configured in Phoenix Tuner
      canbus - The CAN bus this device is on
  • Method Details

    • none

      public static CANdle 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
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • clearAllAnimations

      public final StatusCode clearAllAnimations()
      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