[wpilib] Rename CAN constants to all caps

This commit is contained in:
Peter Johnson
2026-03-17 16:43:51 -07:00
parent 38b9214e38
commit 49065aa07f
4 changed files with 8 additions and 8 deletions

View File

@@ -13,7 +13,7 @@
using namespace wpi;
CAN::CAN(int busId, int deviceId)
: CAN{busId, deviceId, kTeamManufacturer, kTeamDeviceType} {}
: CAN{busId, deviceId, TEAM_MANUFACTURER, TEAM_DEVICE_TYPE} {}
CAN::CAN(int busId, int deviceId, int deviceManufacturer, int deviceType) {
int32_t status = 0;

View File

@@ -148,10 +148,10 @@ class CAN {
bool ReadPacketTimeout(int apiId, int timeoutMs, HAL_CANReceiveMessage* data);
/// Team manufacturer.
static constexpr HAL_CANManufacturer kTeamManufacturer = HAL_CAN_MAN_TEAM_USE;
static constexpr HAL_CANManufacturer TEAM_MANUFACTURER = HAL_CAN_MAN_TEAM_USE;
/// Team device type.
static constexpr HAL_CANDeviceType kTeamDeviceType =
static constexpr HAL_CANDeviceType TEAM_DEVICE_TYPE =
HAL_CAN_DEV_MISCELLANEOUS;
private:

View File

@@ -1,8 +1,8 @@
classes:
wpi::CAN:
attributes:
kTeamManufacturer:
kTeamDeviceType:
TEAM_MANUFACTURER:
TEAM_DEVICE_TYPE:
methods:
CAN:
overloads:

View File

@@ -22,10 +22,10 @@ import org.wpilib.hardware.hal.can.CANReceiveMessage;
*/
public class CAN implements Closeable {
/** Team manufacturer. */
public static final int kTeamManufacturer = CANAPITypes.CANManufacturer.TEAM_USE.id;
public static final int TEAM_MANUFACTURER = CANAPITypes.CANManufacturer.TEAM_USE.id;
/** Team device type. */
public static final int kTeamDeviceType = CANAPITypes.CANDeviceType.MISCELLANEOUS.id;
public static final int TEAM_DEVICE_TYPE = CANAPITypes.CANDeviceType.MISCELLANEOUS.id;
private final int m_handle;
@@ -37,7 +37,7 @@ public class CAN implements Closeable {
* @param deviceId The device id
*/
public CAN(int busId, int deviceId) {
this(busId, deviceId, kTeamManufacturer, kTeamDeviceType);
this(busId, deviceId, TEAM_MANUFACTURER, TEAM_DEVICE_TYPE);
}
/**