From 25746ef27e4f4492e8e8f91de437c6fc9df0d3ff Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 31 Aug 2020 15:31:39 +1000 Subject: [PATCH] AP_OSD: avoid building MAX7456 driver without an SPI device for it --- libraries/AP_OSD/AP_OSD.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_OSD/AP_OSD.cpp b/libraries/AP_OSD/AP_OSD.cpp index 4ba0a9bdb9..ec356686d4 100644 --- a/libraries/AP_OSD/AP_OSD.cpp +++ b/libraries/AP_OSD/AP_OSD.cpp @@ -197,6 +197,7 @@ void AP_OSD::init() break; case OSD_MAX7456: { +#ifdef HAL_WITH_SPI_OSD AP_HAL::OwnPtr spi_dev = std::move(hal.spi->get_device("osd")); if (!spi_dev) { break; @@ -206,6 +207,7 @@ void AP_OSD::init() break; } hal.console->printf("Started MAX7456 OSD\n"); +#endif break; }