AP_Vehicle: correct compilation when AHRS not available

CubeOrange-periph-heavy was broken
This commit is contained in:
Peter Barker 2024-02-13 09:33:40 +11:00 committed by Andrew Tridgell
parent 04b46678a4
commit 84913569cd
1 changed files with 3 additions and 0 deletions

View File

@ -957,11 +957,14 @@ void AP_Vehicle::accel_cal_update()
return;
}
ins.acal_update();
#if AP_AHRS_ENABLED
// check if new trim values, and set them
Vector3f trim_rad;
if (ins.get_new_trim(trim_rad)) {
ahrs.set_trim(trim_rad);
}
#endif
#if HAL_CAL_ALWAYS_REBOOT
if (ins.accel_cal_requires_reboot() &&