From 7da89134311f4a1d578bb3528025e3ee9d9ccfdb Mon Sep 17 00:00:00 2001 From: Holden Date: Fri, 12 Apr 2024 08:59:17 -0400 Subject: [PATCH] Update mavlink submodule --- libs/mavlink/include/mavlink/v2.0 | 2 +- src/MissionManager/PlanManager.cc | 38 +++++++++++++++----------- src/Vehicle/Vehicle.cc | 25 +++++++++-------- src/comm/MockLinkMissionItemHandler.cc | 38 +++++++++++++++----------- 4 files changed, 59 insertions(+), 44 deletions(-) diff --git a/libs/mavlink/include/mavlink/v2.0 b/libs/mavlink/include/mavlink/v2.0 index 55988d1ec99..908a3910ed4 160000 --- a/libs/mavlink/include/mavlink/v2.0 +++ b/libs/mavlink/include/mavlink/v2.0 @@ -1 +1 @@ -Subproject commit 55988d1ec99761b9c5e447a51dcb258161672805 +Subproject commit 908a3910ed4070b9d08e01cbf3e467f413829f1f diff --git a/src/MissionManager/PlanManager.cc b/src/MissionManager/PlanManager.cc index 9ea163b18bc..9e8cb70096c 100644 --- a/src/MissionManager/PlanManager.cc +++ b/src/MissionManager/PlanManager.cc @@ -108,14 +108,17 @@ void PlanManager::_writeMissionCount(void) mavlink_message_t message; SharedLinkInterfacePtr sharedLink = weakLink.lock(); - mavlink_msg_mission_count_pack_chan(qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(), - qgcApp()->toolbox()->mavlinkProtocol()->getComponentId(), - sharedLink->mavlinkChannel(), - &message, - _vehicle->id(), - MAV_COMP_ID_AUTOPILOT1, - _writeMissionItems.count(), - _planType); + mavlink_msg_mission_count_pack_chan( + qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(), + qgcApp()->toolbox()->mavlinkProtocol()->getComponentId(), + sharedLink->mavlinkChannel(), + &message, + _vehicle->id(), + MAV_COMP_ID_AUTOPILOT1, + _writeMissionItems.count(), + _planType, + 0 + ); _vehicle->sendMessageOnLinkThreadSafe(sharedLink.get(), message); } @@ -297,14 +300,17 @@ void PlanManager::_readTransactionComplete(void) SharedLinkInterfacePtr sharedLink = weakLink.lock(); mavlink_message_t message; - mavlink_msg_mission_ack_pack_chan(qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(), - qgcApp()->toolbox()->mavlinkProtocol()->getComponentId(), - sharedLink->mavlinkChannel(), - &message, - _vehicle->id(), - MAV_COMP_ID_AUTOPILOT1, - MAV_MISSION_ACCEPTED, - _planType); + mavlink_msg_mission_ack_pack_chan( + qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(), + qgcApp()->toolbox()->mavlinkProtocol()->getComponentId(), + sharedLink->mavlinkChannel(), + &message, + _vehicle->id(), + MAV_COMP_ID_AUTOPILOT1, + MAV_MISSION_ACCEPTED, + _planType, + 0 + ); _vehicle->sendMessageOnLinkThreadSafe(sharedLink.get(), message); } diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index ee96e87fb34..812c9029302 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -4458,17 +4458,20 @@ void Vehicle::sendJoystickDataThreadSafe(float roll, float pitch, float yaw, flo float newThrustCommand = thrust * axesScaling; mavlink_msg_manual_control_pack_chan( - static_cast(_mavlink->getSystemId()), - static_cast(_mavlink->getComponentId()), - sharedLink->mavlinkChannel(), - &message, - static_cast(_id), - static_cast(newPitchCommand), - static_cast(newRollCommand), - static_cast(newThrustCommand), - static_cast(newYawCommand), - buttons, - 0, 0, 0, 0); + static_cast(_mavlink->getSystemId()), + static_cast(_mavlink->getComponentId()), + sharedLink->mavlinkChannel(), + &message, + static_cast(_id), + static_cast(newPitchCommand), + static_cast(newRollCommand), + static_cast(newThrustCommand), + static_cast(newYawCommand), + buttons, 0, + 0, + 0, 0, + 0, 0, 0, 0, 0, 0 + ); sendMessageOnLinkThreadSafe(sharedLink.get(), message); } diff --git a/src/comm/MockLinkMissionItemHandler.cc b/src/comm/MockLinkMissionItemHandler.cc index c0e7cd62fb5..9fc74c036e8 100644 --- a/src/comm/MockLinkMissionItemHandler.cc +++ b/src/comm/MockLinkMissionItemHandler.cc @@ -155,14 +155,17 @@ void MockLinkMissionItemHandler::_handleMissionRequestList(const mavlink_message mavlink_message_t responseMsg; - mavlink_msg_mission_count_pack_chan(_mockLink->vehicleId(), - MAV_COMP_ID_AUTOPILOT1, - _mockLink->mavlinkChannel(), - &responseMsg, // Outgoing message - msg.sysid, // Target is original sender - msg.compid, // Target is original sender - itemCount, // Number of mission items - _requestType); + mavlink_msg_mission_count_pack_chan( + _mockLink->vehicleId(), + MAV_COMP_ID_AUTOPILOT1, + _mockLink->mavlinkChannel(), + &responseMsg, // Outgoing message + msg.sysid, // Target is original sender + msg.compid, // Target is original sender + itemCount, // Number of mission items + _requestType, + 0 + ); _mockLink->respondWithMavlinkMessage(responseMsg); } } @@ -330,14 +333,17 @@ void MockLinkMissionItemHandler::_sendAck(MAV_MISSION_RESULT ackType) mavlink_message_t message; - mavlink_msg_mission_ack_pack_chan(_mockLink->vehicleId(), - MAV_COMP_ID_AUTOPILOT1, - _mockLink->mavlinkChannel(), - &message, - _mavlinkProtocol->getSystemId(), - _mavlinkProtocol->getComponentId(), - ackType, - _requestType); + mavlink_msg_mission_ack_pack_chan( + _mockLink->vehicleId(), + MAV_COMP_ID_AUTOPILOT1, + _mockLink->mavlinkChannel(), + &message, + _mavlinkProtocol->getSystemId(), + _mavlinkProtocol->getComponentId(), + ackType, + _requestType, + 0 + ); _mockLink->respondWithMavlinkMessage(message); }