mavlink_shell: set target system and component id

These got added in https://github.com/mavlink/mavlink/pull/1725 and need
to be set for correct routing.
This commit is contained in:
Beat Küng
2022-06-17 09:29:43 -04:00
committed by Daniel Agar
parent dea404a9a3
commit b9475d6ebe
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -1778,6 +1778,7 @@ MavlinkReceiver::handle_message_serial_control(mavlink_message_t *msg)
if (shell) {
// we ignore the timeout, EXCLUSIVE & BLOCKING flags of the SERIAL_CONTROL message
if (serial_control_mavlink.count > 0) {
shell->setTargetID(msg->sysid, msg->compid);
shell->write(serial_control_mavlink.data, serial_control_mavlink.count);
}