Commit 628a059b authored by Don Gagne's avatar Don Gagne

Merge pull request #1669 from UAVenture/joystick_input_msg

Send MAVLink message for all joystick modes
parents 7bcd9394 4661e2b6
...@@ -2584,13 +2584,12 @@ void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float t ...@@ -2584,13 +2584,12 @@ void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float t
const float newThrustCommand = thrust * axesScaling; const float newThrustCommand = thrust * axesScaling;
// Send the MANUAL_COMMAND message // Send the MANUAL_COMMAND message
mavlink_message_t message;
mavlink_msg_manual_control_pack(mavlink->getSystemId(), mavlink->getComponentId(), &message, this->uasId, newPitchCommand, newRollCommand, newThrustCommand, newYawCommand, buttons); mavlink_msg_manual_control_pack(mavlink->getSystemId(), mavlink->getComponentId(), &message, this->uasId, newPitchCommand, newRollCommand, newThrustCommand, newYawCommand, buttons);
sendMessage(message);
// Emit an update in control values to other UI elements, like the HSI display
emit attitudeThrustSetPointChanged(this, roll, pitch, yaw, thrust, QGC::groundTimeMilliseconds());
} }
sendMessage(message);
// Emit an update in control values to other UI elements, like the HSI display
emit attitudeThrustSetPointChanged(this, roll, pitch, yaw, thrust, QGC::groundTimeMilliseconds());
} }
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment