AP_Vehicle: compile with AHRS not available

This commit is contained in:
Peter Barker 2024-01-04 12:25:36 +11:00 committed by Peter Barker
parent e7ded62763
commit 185396ee27
2 changed files with 7 additions and 0 deletions

View File

@ -922,8 +922,13 @@ void AP_Vehicle::publish_osd_info()
void AP_Vehicle::get_osd_roll_pitch_rad(float &roll, float &pitch) const
{
#if AP_AHRS_ENABLED
roll = ahrs.get_roll();
pitch = ahrs.get_pitch();
#else
roll = 0.0;
pitch = 0.0;
#endif
}
#if HAL_INS_ACCELCAL_ENABLED

View File

@ -344,8 +344,10 @@ protected:
// false disables external leds)
AP_Notify notify;
#if AP_AHRS_ENABLED
// Inertial Navigation EKF
AP_AHRS ahrs;
#endif
#if HAL_HOTT_TELEM_ENABLED
AP_Hott_Telem hott_telem;