From 4a44b6af86b6a8ef56a73ccb99a0c5fe24e8a938 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 20 Feb 2023 12:05:19 +1100 Subject: [PATCH] AP_UAVCAN: AP_Compass_UAVCAN may not be enabled --- libraries/AP_UAVCAN/AP_UAVCAN.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_UAVCAN/AP_UAVCAN.cpp b/libraries/AP_UAVCAN/AP_UAVCAN.cpp index d7bb7c1722..3fa7ee102b 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN.cpp +++ b/libraries/AP_UAVCAN/AP_UAVCAN.cpp @@ -352,7 +352,9 @@ void AP_UAVCAN::init(uint8_t driver_index, bool enable_filters) // Roundup all subscribers from supported drivers AP_UAVCAN_DNA_Server::subscribe_msgs(this); AP_GPS_UAVCAN::subscribe_msgs(this); +#if AP_COMPASS_UAVCAN_ENABLED AP_Compass_UAVCAN::subscribe_msgs(this); +#endif #if AP_BARO_UAVCAN_ENABLED AP_Baro_UAVCAN::subscribe_msgs(this); #endif