AP_Vehicle: correct compilation when AP_MISSION_ENABLED is false

This commit is contained in:
Peter Barker 2023-12-09 15:05:08 +11:00 committed by Peter Barker
parent 368593c2c6
commit 17f311ef32

View File

@ -850,6 +850,7 @@ void AP_Vehicle::reboot(bool hold_in_bootloader)
#if OSD_ENABLED #if OSD_ENABLED
void AP_Vehicle::publish_osd_info() void AP_Vehicle::publish_osd_info()
{ {
#if AP_MISSION_ENABLED
AP_Mission *mission = AP::mission(); AP_Mission *mission = AP::mission();
if (mission == nullptr) { if (mission == nullptr) {
return; return;
@ -872,6 +873,7 @@ void AP_Vehicle::publish_osd_info()
} }
nav_info.wp_number = mission->get_current_nav_index(); nav_info.wp_number = mission->get_current_nav_index();
osd->set_nav_info(nav_info); osd->set_nav_info(nav_info);
#endif
} }
#endif #endif