mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
AP_UAVCAN: conditionally compile in ADSB support
This commit is contained in:
parent
93ac301b19
commit
940d708438
@ -750,6 +750,7 @@ void AP_UAVCAN::handle_button(AP_UAVCAN* ap_uavcan, uint8_t node_id, const Butto
|
||||
*/
|
||||
void AP_UAVCAN::handle_traffic_report(AP_UAVCAN* ap_uavcan, uint8_t node_id, const TrafficReportCb &cb)
|
||||
{
|
||||
#if HAL_ADSB_ENABLED
|
||||
AP_ADSB *adsb = AP::ADSB();
|
||||
if (!adsb || !adsb->enabled()) {
|
||||
// ADSB not enabled
|
||||
@ -809,6 +810,7 @@ void AP_UAVCAN::handle_traffic_report(AP_UAVCAN* ap_uavcan, uint8_t node_id, con
|
||||
|
||||
vehicle.last_update_ms = AP_HAL::native_millis() - (vehicle.info.tslc * 1000);
|
||||
adsb->handle_adsb_vehicle(vehicle);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user