[wpilibc] ADIS IMUs: Fix memory leak (#4170)

This commit is contained in:
T Grinch
2022-09-06 15:10:33 -05:00
committed by GitHub
parent 65c8fbd452
commit 4267fa08d1
4 changed files with 30 additions and 6 deletions

View File

@@ -285,6 +285,10 @@ class ADIS16448_IMU : public nt::NTSendable,
double gyro_rate_z = 0.0;
};
/** @brief Internal Resources **/
DigitalInput* m_reset_in;
DigitalOutput* m_status_led;
bool SwitchToStandardSPI();
bool SwitchToAutoSPI();

View File

@@ -296,6 +296,10 @@ class ADIS16470_IMU : public nt::NTSendable,
static constexpr double deg_to_rad = 0.0174532;
static constexpr double grav = 9.81;
/** @brief Resources **/
DigitalInput* m_reset_in;
DigitalOutput* m_status_led;
/**
* @brief Switches to standard SPI operation. Primarily used when exiting auto
* SPI mode.