Package com.ctre.phoenix6.hardware
Class CANdle
java.lang.Object
com.ctre.phoenix6.jni.CtreJniWrapper
com.ctre.phoenix6.hardware.ParentDevice
com.ctre.phoenix6.hardware.core.CoreCANdle
com.ctre.phoenix6.hardware.CANdle
- All Implemented Interfaces:
CommonDevice,Sendable,AutoCloseable
WPILib-integrated version of
CoreCANdle.-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenix6.hardware.ParentDevice
ParentDevice.MapGenerator -
Field Summary
FieldsFields inherited from class com.ctre.phoenix6.hardware.ParentDevice
_emptyControl, deviceIdentifier -
Constructor Summary
ConstructorsConstructorDescriptionCANdle(int deviceId) Constructs a new CANdle object.Constructs a new CANdle object.Deprecated, for removal: This API element is subject to removal in a future version.Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. -
Method Summary
Modifier and TypeMethodDescriptionfinal StatusCodeClears all animations on the CANdle.voidclose()voidinitSendable(SendableBuilder builder) static CANdlenone()Constructs a stubbed-out CANdle, where all status signals, controls, configs, etc.Methods inherited from class com.ctre.phoenix6.hardware.core.CoreCANdle
clearStickyFault_5VTooHigh, clearStickyFault_5VTooHigh, clearStickyFault_5VTooLow, clearStickyFault_5VTooLow, clearStickyFault_BootDuringEnable, clearStickyFault_BootDuringEnable, clearStickyFault_Hardware, clearStickyFault_Hardware, clearStickyFault_Overvoltage, clearStickyFault_Overvoltage, clearStickyFault_ShortCircuit, clearStickyFault_ShortCircuit, clearStickyFault_SoftwareFuse, clearStickyFault_SoftwareFuse, clearStickyFault_Thermal, clearStickyFault_Thermal, clearStickyFault_Undervoltage, clearStickyFault_Undervoltage, clearStickyFault_UnlicensedFeatureInUse, clearStickyFault_UnlicensedFeatureInUse, clearStickyFaults, clearStickyFaults, getConfigurator, getDeviceTemp, getDeviceTemp, getFault_5VTooHigh, getFault_5VTooHigh, getFault_5VTooLow, getFault_5VTooLow, getFault_BootDuringEnable, getFault_BootDuringEnable, getFault_Hardware, getFault_Hardware, getFault_Overvoltage, getFault_Overvoltage, getFault_ShortCircuit, getFault_ShortCircuit, getFault_SoftwareFuse, getFault_SoftwareFuse, getFault_Thermal, getFault_Thermal, getFault_Undervoltage, getFault_Undervoltage, getFault_UnlicensedFeatureInUse, getFault_UnlicensedFeatureInUse, getFaultField, getFaultField, getFiveVRailVoltage, getFiveVRailVoltage, getIsProLicensed, getIsProLicensed, getMaxSimultaneousAnimationCount, getMaxSimultaneousAnimationCount, getOutputCurrent, getOutputCurrent, getSimState, getStickyFault_5VTooHigh, getStickyFault_5VTooHigh, getStickyFault_5VTooLow, getStickyFault_5VTooLow, getStickyFault_BootDuringEnable, getStickyFault_BootDuringEnable, getStickyFault_Hardware, getStickyFault_Hardware, getStickyFault_Overvoltage, getStickyFault_Overvoltage, getStickyFault_ShortCircuit, getStickyFault_ShortCircuit, getStickyFault_SoftwareFuse, getStickyFault_SoftwareFuse, getStickyFault_Thermal, getStickyFault_Thermal, getStickyFault_Undervoltage, getStickyFault_Undervoltage, getStickyFault_UnlicensedFeatureInUse, getStickyFault_UnlicensedFeatureInUse, getStickyFaultField, getStickyFaultField, getSupplyVoltage, getSupplyVoltage, getVBatModulation, getVBatModulation, getVersion, getVersion, getVersionBugfix, getVersionBugfix, getVersionBuild, getVersionBuild, getVersionMajor, getVersionMajor, getVersionMinor, getVersionMinor, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControlMethods inherited from class com.ctre.phoenix6.hardware.ParentDevice
getAppliedControl, getDeviceHash, getDeviceID, getNetwork, getResetOccurredChecker, hasResetOccurred, isConnected, isConnected, lookupStatusSignal, lookupStatusSignal, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, resetSignalFrequencies, resetSignalFrequencies, resetSignalFrequenciesForAll, setControlPrivate
-
Field Details
-
kAnimSlotCount
The number of animation slots.- See Also:
-
-
Constructor Details
-
CANdle
Constructs a new CANdle object.Constructs the device using the default CAN bus for the system (see
CANBus()).- Parameters:
deviceId- ID of the device, as configured in Phoenix Tuner
-
CANdle
Deprecated, for removal: This API element is subject to removal in a future version.Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. Construct devices using aCANBusinstance instead.Constructs a new CANdle object.- Parameters:
deviceId- ID of the device, as configured in Phoenix Tunercanbus- Name of 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
-
CANdle
Constructs a new CANdle object.- Parameters:
deviceId- ID of the device, as configured in Phoenix Tunercanbus- The CAN bus this device is on
-
-
Method Details
-
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
- Specified by:
closein interfaceAutoCloseable
-
clearAllAnimations
Clears all animations on the CANdle. This is equivalent to applying anEmptyAnimationto all the animation slots on the CANdle.- Returns:
- Status code of the first failed control call, or OK if all succeeded
-
initSendable
- Specified by:
initSendablein interfaceSendable
-