mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal,wpilib] Rename I2C constants to all caps
This commit is contained in:
@@ -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() {}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user