mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 09:43:57 -04:00
AP_Mount: fix where status_msg() is sent
send to the channel where the trigger msg was sent from
This commit is contained in:
parent
b473f8fd4d
commit
30a3927ea8
@ -494,7 +494,7 @@ void AP_Mount::control_msg(mavlink_message_t *msg)
|
|||||||
|
|
||||||
/// Return mount status information (depends on the previously set mount configuration)
|
/// Return mount status information (depends on the previously set mount configuration)
|
||||||
/// triggered by a MavLink packet.
|
/// triggered by a MavLink packet.
|
||||||
void AP_Mount::status_msg(mavlink_message_t *msg)
|
void AP_Mount::status_msg(mavlink_message_t *msg, mavlink_channel_t chan)
|
||||||
{
|
{
|
||||||
__mavlink_mount_status_t packet;
|
__mavlink_mount_status_t packet;
|
||||||
mavlink_msg_mount_status_decode(msg, &packet);
|
mavlink_msg_mount_status_decode(msg, &packet);
|
||||||
@ -524,9 +524,7 @@ void AP_Mount::status_msg(mavlink_message_t *msg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// status reply
|
mavlink_msg_mount_status_send_buf(msg, chan, packet.target_system, packet.target_component,
|
||||||
// TODO: is COMM_3 correct ?
|
|
||||||
mavlink_msg_mount_status_send(MAVLINK_COMM_3, packet.target_system, packet.target_component,
|
|
||||||
packet.pointing_a, packet.pointing_b, packet.pointing_c);
|
packet.pointing_a, packet.pointing_b, packet.pointing_c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
// MAVLink methods
|
// MAVLink methods
|
||||||
void configure_msg(mavlink_message_t* msg);
|
void configure_msg(mavlink_message_t* msg);
|
||||||
void control_msg(mavlink_message_t* msg);
|
void control_msg(mavlink_message_t* msg);
|
||||||
void status_msg(mavlink_message_t* msg);
|
void status_msg(mavlink_message_t* msg, mavlink_channel_t chan);
|
||||||
void set_roi_cmd(const struct Location *target_loc);
|
void set_roi_cmd(const struct Location *target_loc);
|
||||||
void configure_cmd();
|
void configure_cmd();
|
||||||
void control_cmd();
|
void control_cmd();
|
||||||
|
Loading…
Reference in New Issue
Block a user