mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:13:33 +08:00
mavlink: don't send gimbal_device_attitude_status
If we receive gimbal_device_attitude_status by mavlink we should not re-send it as we are already supposed to be forwarding mavlink traffic from the gimbal to the ground station.
This commit is contained in:
@@ -66,6 +66,14 @@ private:
|
||||
gimbal_device_attitude_status_s gimbal_device_attitude_status{};
|
||||
|
||||
if (_gimbal_device_attitude_status_sub.update(&gimbal_device_attitude_status)) {
|
||||
|
||||
if (gimbal_device_attitude_status.received_from_mavlink) {
|
||||
// If we have already received the gimbal device's attitude via
|
||||
// mavlink it is already forwarded directly and we don't need
|
||||
// to re-publish it here.
|
||||
return false;
|
||||
}
|
||||
|
||||
mavlink_gimbal_device_attitude_status_t msg{};
|
||||
|
||||
msg.target_system = gimbal_device_attitude_status.target_system;
|
||||
|
||||
Reference in New Issue
Block a user