Class CANdle
java.lang.Object
com.ctre.phoenix6.hardware.ParentDevice
com.ctre.phoenix6.hardware.core.CoreCANdle
com.ctre.phoenix6.hardware.CANdle
- All Implemented Interfaces:
PhoenixAlertable, CommonDevice, AutoCloseable
WPILib-integrated version of
CoreCANdle.-
Nested Class Summary
Nested classes/interfaces inherited from class ParentDevice
ParentDevice.MapGenerator -
Field Summary
FieldsFields inherited from class ParentDevice
_emptyControl, deviceIdentifier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StatusCodeClears all animations on the CANdle.voidclose()static CANdlenone()Constructs a stubbed-out CANdle, where all status signals, controls, configs, etc.Methods inherited from class 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, registerAlerts, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControl, setControlMethods inherited from class ParentDevice
getAppliedControl, getDeviceHash, getDeviceID, getIsConnectedChecker, getIsConnectedChecker, getNetwork, getResetOccurredChecker, hasResetOccurred, isConnected, isConnected, lookupStatusSignal, lookupStatusSignal, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, resetSignalFrequencies, resetSignalFrequencies, resetSignalFrequenciesForAll, setControlPrivate, toString
-
Field Details
-
kAnimSlotCount
public static final int kAnimSlotCountThe number of animation slots.- See Also:
-
-
Constructor Details
-
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
public void 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
-