AP_InertialSensor: added gyro_harmonic_notch_enabled()

This commit is contained in:
Andrew Tridgell 2019-11-17 16:26:22 +11:00 committed by Randy Mackay
parent 77d21f9f5d
commit 9dc618ddd4
2 changed files with 5 additions and 2 deletions

View File

@ -243,6 +243,9 @@ public:
// check for vibration movement. True when all axis show nearly zero movement // check for vibration movement. True when all axis show nearly zero movement
bool is_still(); bool is_still();
// return true if harmonic notch enabled
bool gyro_harmonic_notch_enabled(void) const { return _harmonic_notch_filter.enabled(); }
/* /*
HIL set functions. The minimum for HIL is set_accel() and HIL set functions. The minimum for HIL is set_accel() and
set_gyro(). The others are option for higher fidelity log set_gyro(). The others are option for higher fidelity log

View File

@ -244,7 +244,7 @@ protected:
// return the notch filter attenuation in dB for the sample rate // return the notch filter attenuation in dB for the sample rate
float _gyro_notch_attenuation_dB(void) const { return _imu._notch_filter.attenuation_dB(); } float _gyro_notch_attenuation_dB(void) const { return _imu._notch_filter.attenuation_dB(); }
uint8_t _gyro_notch_enabled(void) const { return _imu._notch_filter.enabled(); } bool _gyro_notch_enabled(void) const { return _imu._notch_filter.enabled(); }
// return the harmonic notch filter center in Hz for the sample rate // return the harmonic notch filter center in Hz for the sample rate
float gyro_harmonic_notch_center_freq_hz() const { return _imu._calculated_harmonic_notch_freq_hz; } float gyro_harmonic_notch_center_freq_hz() const { return _imu._calculated_harmonic_notch_freq_hz; }
@ -255,7 +255,7 @@ protected:
// return the harmonic notch filter attenuation in dB for the sample rate // return the harmonic notch filter attenuation in dB for the sample rate
float gyro_harmonic_notch_attenuation_dB(void) const { return _imu._harmonic_notch_filter.attenuation_dB(); } float gyro_harmonic_notch_attenuation_dB(void) const { return _imu._harmonic_notch_filter.attenuation_dB(); }
uint8_t gyro_harmonic_notch_enabled(void) const { return _imu._harmonic_notch_filter.enabled(); } bool gyro_harmonic_notch_enabled(void) const { return _imu._harmonic_notch_filter.enabled(); }
// common gyro update function for all backends // common gyro update function for all backends
void update_gyro(uint8_t instance); void update_gyro(uint8_t instance);