mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
GCS_MAVLink: handle DO_ADSB_OUT_IDENT as both long and int
This commit is contained in:
parent
f7dd6dec96
commit
9285188d85
@ -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;
|
||||
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user