Skip to content

Commit

Permalink
GCS_MAVLink: handle DO_ADSB_OUT_IDENT as both long and int
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Nov 6, 2023
1 parent f7dd6de commit 9285188
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions libraries/GCS_MAVLink/GCS_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4755,17 +4755,6 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
break;
#endif

#if HAL_ADSB_ENABLED
case MAV_CMD_DO_ADSB_OUT_IDENT:
if ((AP::ADSB() != nullptr) && AP::ADSB()->ident_start()) {
result = MAV_RESULT_ACCEPTED;
}
else {
result = MAV_RESULT_FAILED;
}
break;
#endif

default:
result = try_command_long_as_command_int(packet, msg);
break;
Expand Down Expand Up @@ -5045,6 +5034,14 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
case MAV_CMD_DEBUG_TRAP:
return handle_command_debug_trap(packet);

#if HAL_ADSB_ENABLED
case MAV_CMD_DO_ADSB_OUT_IDENT:
if ((AP::ADSB() != nullptr) && AP::ADSB()->ident_start()) {
return MAV_RESULT_ACCEPTED;
}
return MAV_RESULT_FAILED;
#endif

case MAV_CMD_DO_AUX_FUNCTION:
return handle_command_do_aux_function(packet);

Expand Down

0 comments on commit 9285188

Please sign in to comment.