Skip to content

Commit

Permalink
AP_UAVCAN: Add proximity support
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabsingh3003 committed Nov 21, 2022
1 parent b01e892 commit cb68475
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/AP_UAVCAN/AP_UAVCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cb68475

Please sign in to comment.