From 14133380e2d3b394a0d26a0e8d08194f7b1e0733 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Mon, 9 Dec 2019 13:11:22 +0100 Subject: [PATCH] vmount: set all DO_MOUNT_CONFIGURE params We previously did not set param2 to param7 of DO_MOUNT_CONFIGURE. --- src/modules/vmount/output_mavlink.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/vmount/output_mavlink.cpp b/src/modules/vmount/output_mavlink.cpp index e244e5c1ce..d30d835fd0 100644 --- a/src/modules/vmount/output_mavlink.cpp +++ b/src/modules/vmount/output_mavlink.cpp @@ -75,6 +75,15 @@ int OutputMavlink::update(const ControlData *control_data) vehicle_command.param1 = vehicle_command_s::VEHICLE_MOUNT_MODE_MAVLINK_TARGETING; } + // We assume that a MAVLink gimbal does the stabilization. + vehicle_command.param2 = 0.0f; + vehicle_command.param3 = 0.0f; + vehicle_command.param4 = 0.0f; + + vehicle_command.param5 = static_cast(control_data->type_data.angle.frames[0]); + vehicle_command.param6 = static_cast(control_data->type_data.angle.frames[1]); + vehicle_command.param7 = static_cast(control_data->type_data.angle.frames[2]); + _vehicle_command_pub.publish(vehicle_command); }