|
|
|
@ -325,7 +325,7 @@ bool AP_ADSB::find_index(const adsb_vehicle_t &vehicle, uint16_t *index) const
@@ -325,7 +325,7 @@ bool AP_ADSB::find_index(const adsb_vehicle_t &vehicle, uint16_t *index) const
|
|
|
|
|
* Update the vehicle list. If the vehicle is already in the |
|
|
|
|
* list then it will update it, otherwise it will be added. |
|
|
|
|
*/ |
|
|
|
|
void AP_ADSB::update_vehicle(const mavlink_message_t* packet) |
|
|
|
|
void AP_ADSB::handle_vehicle(const mavlink_message_t* packet) |
|
|
|
|
{ |
|
|
|
|
if (in_state.vehicle_list == nullptr) { |
|
|
|
|
// We are only null when disabled. Updating is inhibited.
|
|
|
|
@ -559,7 +559,7 @@ void AP_ADSB::send_configure(const mavlink_channel_t chan)
@@ -559,7 +559,7 @@ void AP_ADSB::send_configure(const mavlink_channel_t chan)
|
|
|
|
|
* we determine which channel is on so we don't have to send out_state to all channels |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
void AP_ADSB::transceiver_report(const mavlink_channel_t chan, const mavlink_message_t* msg) |
|
|
|
|
void AP_ADSB::handle_transceiver_report(const mavlink_channel_t chan, const mavlink_message_t* msg) |
|
|
|
|
{ |
|
|
|
|
mavlink_uavionix_adsb_transceiver_health_report_t packet {}; |
|
|
|
|
mavlink_msg_uavionix_adsb_transceiver_health_report_decode(msg, &packet); |
|
|
|
@ -658,3 +658,22 @@ bool AP_ADSB::next_sample(adsb_vehicle_t &vehicle)
@@ -658,3 +658,22 @@ bool AP_ADSB::next_sample(adsb_vehicle_t &vehicle)
|
|
|
|
|
{ |
|
|
|
|
return samples.pop_front(vehicle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void AP_ADSB::handle_message(const mavlink_channel_t chan, const mavlink_message_t* msg) |
|
|
|
|
{ |
|
|
|
|
switch (msg->msgid) { |
|
|
|
|
case MAVLINK_MSG_ID_ADSB_VEHICLE: |
|
|
|
|
handle_vehicle(msg); |
|
|
|
|
break; |
|
|
|
|
case MAVLINK_MSG_ID_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT: |
|
|
|
|
handle_transceiver_report(chan, msg); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG: |
|
|
|
|
case MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_DYNAMIC: |
|
|
|
|
// unhandled, these are outbound packets only
|
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|