[wpilib] Fix ADIS16448 IMU default constructor not working in Java (#3989)

Also fixes a few related uninitialized variables in C++.
This commit is contained in:
Thad House
2022-02-03 22:09:12 -08:00
committed by GitHub
parent fcf23fc9e9
commit 4b3edb742c
3 changed files with 3 additions and 3 deletions

View File

@@ -354,7 +354,7 @@ class ADIS16448_IMU : public nt::NTSendable,
bool m_auto_configured = false;
SPI::Port m_spi_port;
CalibrationTime m_calibration_time;
CalibrationTime m_calibration_time{0};
SPI* m_spi = nullptr;
DigitalInput* m_auto_interrupt = nullptr;

View File

@@ -374,7 +374,7 @@ class ADIS16470_IMU : public nt::NTSendable,
volatile bool m_thread_idle = false;
bool m_auto_configured = false;
SPI::Port m_spi_port;
uint16_t m_calibration_time;
uint16_t m_calibration_time = 0;
SPI* m_spi = nullptr;
DigitalInput* m_auto_interrupt = nullptr;
double m_scaled_sample_rate = 2500.0; // Default sample rate setting

View File

@@ -169,7 +169,7 @@ public class ADIS16448_IMU implements AutoCloseable, NTSendable {
/* State variables */
private volatile boolean m_thread_active = false;
private CalibrationTime m_calibration_time = CalibrationTime._512ms;
private CalibrationTime m_calibration_time = CalibrationTime._32ms;
private volatile boolean m_first_run = true;
private volatile boolean m_thread_idle = false;
private boolean m_auto_configured = false;