diff --git a/libraries/AP_BoardConfig/board_drivers.cpp b/libraries/AP_BoardConfig/board_drivers.cpp index 06f9bb9e10..5eaac1381d 100644 --- a/libraries/AP_BoardConfig/board_drivers.cpp +++ b/libraries/AP_BoardConfig/board_drivers.cpp @@ -152,6 +152,7 @@ bool AP_BoardConfig::spi_check_register(const char *devname, uint8_t regnum, uin return v == value; } +#if defined(HAL_VALIDATE_BOARD) static bool check_ms5611(const char* devname) { auto dev = hal.spi->get_device(devname); if (!dev) { @@ -210,6 +211,7 @@ static bool check_ms5611(const char* devname) { return true; } +#endif // HAL_VALIDATE_BOARD #define MPUREG_WHOAMI 0x75 #define MPU_WHOAMI_MPU60X0 0x68