Skip to content

Commit 30e3b53

Browse files
committed
AP_VisualOdom: correct unused variable in visualodom
when both logging and gcs are compiled out
1 parent 5e5fde7 commit 30e3b53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/AP_VisualOdom/AP_VisualOdom_Backend.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ void AP_VisualOdom_Backend::handle_vision_position_delta_msg(const mavlink_messa
5555
_last_update_ms = now_ms;
5656

5757
// send to EKF
58+
#if AP_AHRS_ENABLED || HAL_LOGGING_ENABLED
5859
const float time_delta_sec = packet.time_delta_usec * 1.0E-6;
60+
#endif
5961
#if AP_AHRS_ENABLED
6062
AP::ahrs().writeBodyFrameOdom(packet.confidence,
6163
position_delta,

0 commit comments

Comments
 (0)