mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilibj] ADIS16470: Allow product ID of 16470 (#7704)
C++ allows either 16982 or 16470, do the same for Java.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user