AP_VisualOdom: correct compilation when AP_AHRS_ENABLED is off

e.g. CubeOrange-periph-heavy
This commit is contained in:
Peter Barker 2024-01-11 09:16:57 +11:00 committed by Peter Barker
parent 7b5a4d9f2c
commit 7e0ea05ae9
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@ void AP_VisualOdom_Backend::handle_vision_position_delta_msg(const mavlink_messa
// send to EKF
const float time_delta_sec = packet.time_delta_usec * 1.0E-6;
#if AP_AHRS_ENABLED
AP::ahrs().writeBodyFrameOdom(packet.confidence,
position_delta,
angle_delta,
@ -63,6 +64,7 @@ void AP_VisualOdom_Backend::handle_vision_position_delta_msg(const mavlink_messa
now_ms,
_frontend.get_delay_ms(),
_frontend.get_pos_offset());
#endif
// log sensor data
Write_VisualOdom(time_delta_sec,