[wpilib] Add warning about onboard I2C (#3842)

This commit is contained in:
Kevin-OConnor
2021-12-30 16:13:03 -05:00
committed by GitHub
parent eee29daaf9
commit b85c24a79c
2 changed files with 14 additions and 0 deletions

View File

@@ -43,6 +43,12 @@ public class I2C implements AutoCloseable {
m_port = port.value;
m_deviceAddress = deviceAddress;
if (port == I2C.Port.kOnboard) {
DriverStation.reportWarning(
"Onboard I2C port is subject to system lockups. See Known Issues page for details",
false);
}
I2CJNI.i2CInitialize((byte) port.value);
HAL.report(tResourceType.kResourceType_I2C, deviceAddress);