[wpilibj] ADIS16470: Allow product ID of 16470 (#7704)

C++ allows either 16982 or 16470, do the same for Java.
This commit is contained in:
Peter Johnson
2025-01-17 14:53:20 -07:00
committed by GitHub
parent e52f400687
commit 4caa16e254

View File

@@ -483,7 +483,8 @@ public class ADIS16470_IMU implements AutoCloseable, Sendable {
}
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;