Skip to content

Commit

Permalink
AP_Vehicle: correct compilation when AHRS not available
Browse files Browse the repository at this point in the history
CubeOrange-periph-heavy was broken
  • Loading branch information
peterbarker committed Feb 12, 2024
1 parent 74e742f commit 4fbf422
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_Vehicle/AP_Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,11 +947,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() &&
Expand Down

0 comments on commit 4fbf422

Please sign in to comment.