From 6360c67858bf93845589461a9843d457a40b24e6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Mar 2020 12:57:43 +1100 Subject: [PATCH] AP_OSD: avoid build when OSD disabled --- libraries/AP_OSD/AP_OSD.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_OSD/AP_OSD.cpp b/libraries/AP_OSD/AP_OSD.cpp index 14f3f385e7..925e466cf5 100644 --- a/libraries/AP_OSD/AP_OSD.cpp +++ b/libraries/AP_OSD/AP_OSD.cpp @@ -18,6 +18,9 @@ */ #include "AP_OSD.h" + +#if OSD_ENABLED + #include "AP_OSD_MAX7456.h" #ifdef WITH_SITL_OSD #include "AP_OSD_SITL.h" @@ -400,3 +403,5 @@ void AP_OSD::set_nav_info(NavInfo &navinfo) AP_OSD *AP::osd() { return AP_OSD::get_singleton(); } + +#endif // OSD_ENABLED