From 4caa16e254fb4e668eb9f58a382d8f98e0d361fa Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 17 Jan 2025 14:53:20 -0700 Subject: [PATCH] [wpilibj] ADIS16470: Allow product ID of 16470 (#7704) C++ allows either 16982 or 16470, do the same for Java. --- wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java index c2700b82c9b..169f13dd469 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java @@ -483,7 +483,8 @@ private boolean switchToStandardSPI() { } readRegister(PROD_ID); // Dummy read // Validate the product ID - if (readRegister(PROD_ID) != 16982) { + int prodId = readRegister(PROD_ID); + if (prodId != 16982 && prodId != 16470) { DriverStation.reportError("Could not find an ADIS16470", false); close(); return false;