Skip to content

Commit

Permalink
AP_VisualOdom: correct compilation when AP_AHRS_ENABLED is off
Browse files Browse the repository at this point in the history
e.g. CubeOrange-periph-heavy
  • Loading branch information
peterbarker committed Jan 16, 2024
1 parent 7b5a4d9 commit 7e0ea05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_VisualOdom/AP_VisualOdom_Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ 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,
time_delta_sec,
now_ms,
_frontend.get_delay_ms(),
_frontend.get_pos_offset());
#endif

// log sensor data
Write_VisualOdom(time_delta_sec,
Expand Down

0 comments on commit 7e0ea05

Please sign in to comment.