[wpilib] Close sim device in ADIS IMUs (#5776)

Fixes #5775.
This commit is contained in:
Tyler Veness
2023-10-17 19:51:35 -07:00
committed by GitHub
parent 99630d2e78
commit 7501e4ac88
2 changed files with 8 additions and 0 deletions

View File

@@ -656,6 +656,10 @@ public class ADIS16448_IMU implements AutoCloseable, Sendable {
m_spi = null;
}
}
if (m_simDevice != null) {
m_simDevice.close();
m_simDevice = null;
}
System.out.println("Finished cleaning up after the IMU driver.");
}

View File

@@ -681,6 +681,10 @@ public class ADIS16470_IMU implements AutoCloseable, Sendable {
m_spi = null;
}
}
if (m_simDevice != null) {
m_simDevice.close();
m_simDevice = null;
}
System.out.println("Finished cleaning up after the IMU driver.");
}