Skip to content

Commit

Permalink
telemetry: fix target compid of two commands
Browse files Browse the repository at this point in the history
If we send them to any component, then we might get an answer from
someone else rather then the autopilot and get confused.
  • Loading branch information
julianoes committed Oct 7, 2021
1 parent ee84bd9 commit 58a9fae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/telemetry/telemetry_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,7 @@ void TelemetryImpl::request_home_position_async()
{
MavlinkCommandSender::CommandLong command_request_message{*_parent};
command_request_message.command = MAV_CMD_REQUEST_MESSAGE;
command_request_message.target_component = MAV_COMP_ID_AUTOPILOT1;
command_request_message.params.param1 = MAVLINK_MSG_ID_HOME_POSITION;
_parent->send_command_async(command_request_message, nullptr);
}
Expand Down Expand Up @@ -2309,6 +2310,7 @@ void TelemetryImpl::get_gps_global_origin_async(

MavlinkCommandSender::CommandLong command_request_message{*_parent};
command_request_message.command = MAV_CMD_REQUEST_MESSAGE;
command_request_message.target_component = MAV_COMP_ID_AUTOPILOT1;
command_request_message.params.param1 = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;

_parent->send_command_async(command_request_message, nullptr);
Expand Down

0 comments on commit 58a9fae

Please sign in to comment.