fix(mavlink): Rem depr. MAV_CMD_REQUEST _AUTOPILOT_CAPABILITIES/T_PROTOCOL_VERSION

This commit is contained in:
Hamish Willee
2026-05-07 09:14:25 +10:00
parent a1726d316a
commit 8291455620
+2 -18
View File
@@ -457,24 +457,8 @@ void MavlinkReceiver::handle_messages_in_gimbal_mode(mavlink_message_t &msg)
bool
MavlinkReceiver::evaluate_target_ok(int command, int target_system, int target_component)
{
/* evaluate if this system should accept this command */
bool target_ok = false;
switch (command) {
case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES:
case MAV_CMD_REQUEST_PROTOCOL_VERSION:
/* broadcast and ignore component */
target_ok = (target_system == 0) || (target_system == mavlink_system.sysid);
break;
default:
target_ok = ((target_system == 0) || (target_system == mavlink_system.sysid))
&& ((target_component == mavlink_system.compid) || (target_component == MAV_COMP_ID_ALL));
break;
}
return target_ok;
return ((target_system == 0) || (target_system == mavlink_system.sysid))
&& ((target_component == mavlink_system.compid) || (target_component == MAV_COMP_ID_ALL));
}
void