AP_UAVCAN: Add proximity support

This commit is contained in:
rishabsingh3003 2022-12-14 13:36:07 +05:30 committed by Andrew Tridgell
parent d8cf7c8bb5
commit 650f0ff659

View File

@ -61,6 +61,7 @@
#include <AP_Notify/AP_Notify.h>
#include <AP_OpenDroneID/AP_OpenDroneID.h>
#include "AP_UAVCAN_pool.h"
#include <AP_Proximity/AP_Proximity_DroneCAN.h>
#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<uavcan::equipment::actuator::ArrayCommand>(*_node);
act_out_array[driver_index]->setTxTimeout(uavcan::MonotonicDuration::fromMSec(2));
act_out_array[driver_index]->setPriority(uavcan::TransferPriority::OneLowerThanHighest);