mavlink: hack to forward messages from gimbal

This is a hack to make sure the messages from the gimbal arrive at other
links (e.g. the ground station). It means that the gimbal does not get
flooded with all other messages that would get forwarded but messages
from the gimbal will still make it through.
This commit is contained in:
Julian Oes 2020-11-02 17:08:32 +01:00 committed by Daniel Agar
parent b8ad7092dc
commit 6f56797f3d
2 changed files with 6 additions and 1 deletions

View File

@ -261,7 +261,7 @@ else
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
# Onboard link to gimbal
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -f -m gimbal
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal
fi
# execute autostart post script if any

View File

@ -1129,6 +1129,11 @@ Mavlink::handle_message(const mavlink_message_t *msg)
/* forward any messages to other mavlink instances */
Mavlink::forward_message(msg, this);
}
// Special case for gimbals that need to forward GIMBAL_DEVICE_ATTITUDE_STATUS.
else if (msg->msgid == MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS) {
Mavlink::forward_message(msg, this);
}
}
void