mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] Rename CAN constants to all caps
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
classes:
|
||||
wpi::CAN:
|
||||
attributes:
|
||||
kTeamManufacturer:
|
||||
kTeamDeviceType:
|
||||
TEAM_MANUFACTURER:
|
||||
TEAM_DEVICE_TYPE:
|
||||
methods:
|
||||
CAN:
|
||||
overloads:
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user