[hal,wpilib] Rename I2C constants to all caps

This commit is contained in:
Peter Johnson
2026-03-14 11:51:53 -07:00
parent b68fbb1adc
commit 261a0ebbd7
14 changed files with 38 additions and 32 deletions

View File

@@ -15,7 +15,7 @@ import org.wpilib.hardware.bus.I2C;
public class Robot extends TimedRobot {
// Creates an ADXL345 accelerometer object on the MXP I2C port
// with a measurement range from -8 to 8 G's
ADXL345_I2C m_accelerometer345I2C = new ADXL345_I2C(I2C.Port.kPort0, ADXL345_I2C.Range.k8G);
ADXL345_I2C m_accelerometer345I2C = new ADXL345_I2C(I2C.Port.PORT_0, ADXL345_I2C.Range.k8G);
/** Called once at the beginning of the robot program. */
public Robot() {}

View File

@@ -15,7 +15,7 @@ import org.wpilib.hardware.bus.I2C.Port;
* code using the roboRIO's I2C port.
*/
public class Robot extends TimedRobot {
static final Port kPort = Port.kPort0;
static final Port kPort = Port.PORT_0;
private static final int kDeviceAddress = 4;
private final I2C m_arduino = new I2C(kPort, kDeviceAddress);