From 650f0ff65980bfb88d046266161c6481710f7659 Mon Sep 17 00:00:00 2001 From: rishabsingh3003 Date: Wed, 14 Dec 2022 13:36:07 +0530 Subject: [PATCH] AP_UAVCAN: Add proximity support --- libraries/AP_UAVCAN/AP_UAVCAN.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_UAVCAN/AP_UAVCAN.cpp b/libraries/AP_UAVCAN/AP_UAVCAN.cpp index 0020150936..9dbe0c8a49 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN.cpp +++ b/libraries/AP_UAVCAN/AP_UAVCAN.cpp @@ -61,6 +61,7 @@ #include #include #include "AP_UAVCAN_pool.h" +#include #define LED_DELAY_US 50000 @@ -356,6 +357,10 @@ void AP_UAVCAN::init(uint8_t driver_index, bool enable_filters) AP_EFI_DroneCAN::subscribe_msgs(this); #endif +#if AP_PROXIMITY_DRONECAN_ENABLED + AP_Proximity_DroneCAN::subscribe_msgs(this); +#endif + act_out_array[driver_index] = new uavcan::Publisher(*_node); act_out_array[driver_index]->setTxTimeout(uavcan::MonotonicDuration::fromMSec(2)); act_out_array[driver_index]->setPriority(uavcan::TransferPriority::OneLowerThanHighest);