Skip to content

Commit

Permalink
[wpilib] Remove I2C Warnings (wpilibsuite#7677)
Browse files Browse the repository at this point in the history
SystemCore won't have the I2C issues.
  • Loading branch information
ThadHouse authored Jan 14, 2025
1 parent 45d7549 commit fa71fb5
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 32 deletions.
7 changes: 0 additions & 7 deletions wpilibc/src/main/native/cpp/I2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ I2C::I2C(Port port, int deviceAddress)
: m_port(static_cast<HAL_I2CPort>(port)), m_deviceAddress(deviceAddress) {
int32_t status = 0;

if (port == I2C::Port::kOnboard) {
FRC_ReportWarning(
"Onboard I2C port is subject to system lockups. See Known "
"Issues page for "
"details");
}

HAL_InitializeI2C(m_port, &status);
FRC_CheckErrorStatus(status, "Port {}", static_cast<int>(port));

Expand Down
4 changes: 0 additions & 4 deletions wpilibc/src/main/native/include/frc/ADXL345_I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ namespace frc {
* This class allows access to a Analog Devices ADXL345 3-axis accelerometer on
* an I2C bus. This class assumes the default (not alternate) sensor address of
* 0x1D (7-bit address).
*
* The Onboard I2C port is subject to system lockups. See <a
* href="https://docs.wpilib.org/en/stable/docs/yearly-overview/known-issues.html#onboard-i2c-causing-system-lockups">
* WPILib Known Issues</a> page for details.
*/
class ADXL345_I2C : public nt::NTSendable,
public wpi::SendableHelper<ADXL345_I2C> {
Expand Down
4 changes: 0 additions & 4 deletions wpilibc/src/main/native/include/frc/I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ namespace frc {
*
* This class is intended to be used by sensor (and other I2C device) drivers.
* It probably should not be used directly.
*
* The Onboard I2C port is subject to system lockups. See <a
* href="https://docs.wpilib.org/en/stable/docs/yearly-overview/known-issues.html#onboard-i2c-causing-system-lockups">
* WPILib Known Issues</a> page for details.
*/
class I2C {
public:
Expand Down
8 changes: 1 addition & 7 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/ADXL345_I2C.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/**
* ADXL345 I2C Accelerometer.
*
* <p>The Onboard I2C port is subject to system lockups. See <a
* href="https://docs.wpilib.org/en/stable/docs/yearly-overview/known-issues.html#onboard-i2c-causing-system-lockups">
* WPILib Known Issues</a> page for details.
*/
/** ADXL345 I2C Accelerometer. */
@SuppressWarnings("TypeName")
public class ADXL345_I2C implements NTSendable, AutoCloseable {
/** Default I2C device address. */
Expand Down
10 changes: 0 additions & 10 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
*
* <p>This class is intended to be used by sensor (and other I2C device) drivers. It probably should
* not be used directly.
*
* <p>The Onboard I2C port is subject to system lockups. See <a
* href="https://docs.wpilib.org/en/stable/docs/yearly-overview/known-issues.html#onboard-i2c-causing-system-lockups">
* WPILib Known Issues</a> page for details.
*/
public class I2C implements AutoCloseable {
/** I2C connection ports. */
Expand Down Expand Up @@ -51,12 +47,6 @@ public I2C(Port port, int deviceAddress) {
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);
Expand Down

0 comments on commit fa71fb5

Please sign in to comment.