From c2fe813e0f6809ebc36a43d3a5282b2d7dd0c6b3 Mon Sep 17 00:00:00 2001 From: pixhawk Date: Wed, 2 Nov 2011 12:40:54 +0100 Subject: [PATCH] Fixed v10 compile errors;\ --- src/comm/MAVLinkSimulationLink.cc | 6 +++--- src/comm/MAVLinkSimulationWaypointPlanner.cc | 6 +++--- src/ui/MAVLinkDecoder.cc | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/comm/MAVLinkSimulationLink.cc b/src/comm/MAVLinkSimulationLink.cc index 91804cd69..484404ae8 100644 --- a/src/comm/MAVLinkSimulationLink.cc +++ b/src/comm/MAVLinkSimulationLink.cc @@ -705,9 +705,9 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size) } break; // EXECUTE OPERATOR ACTIONS - case MAVLINK_MSG_ID_COMMAND_SHORT: { - mavlink_command_short_t action; - mavlink_msg_command_short_decode(&msg, &action); + case MAVLINK_MSG_ID_COMMAND_LONG: { + mavlink_command_long_t action; + mavlink_msg_command_long_decode(&msg, &action); qDebug() << "SIM" << "received action" << action.command << "for system" << action.target_system; diff --git a/src/comm/MAVLinkSimulationWaypointPlanner.cc b/src/comm/MAVLinkSimulationWaypointPlanner.cc index e1b794a35..a53f17c5d 100644 --- a/src/comm/MAVLinkSimulationWaypointPlanner.cc +++ b/src/comm/MAVLinkSimulationWaypointPlanner.cc @@ -815,10 +815,10 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* break; } - case MAVLINK_MSG_ID_COMMAND_SHORT: + case MAVLINK_MSG_ID_COMMAND_LONG: { // special action from ground station - mavlink_command_short_t action; - mavlink_msg_command_short_decode(msg, &action); + mavlink_command_long_t action; + mavlink_msg_command_long_decode(msg, &action); if(action.target_system == systemid) { if (verbose) qDebug("Waypoint: received message with action %d\n", action.command); // switch (action.action) { diff --git a/src/ui/MAVLinkDecoder.cc b/src/ui/MAVLinkDecoder.cc index 538c3e226..703e09f63 100644 --- a/src/ui/MAVLinkDecoder.cc +++ b/src/ui/MAVLinkDecoder.cc @@ -12,7 +12,6 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol, QObject *parent) : messageFilter.insert(MAVLINK_MSG_ID_HEARTBEAT, false); messageFilter.insert(MAVLINK_MSG_ID_SYS_STATUS, false); messageFilter.insert(MAVLINK_MSG_ID_STATUSTEXT, false); - messageFilter.insert(MAVLINK_MSG_ID_COMMAND_SHORT, false); messageFilter.insert(MAVLINK_MSG_ID_COMMAND_LONG, false); messageFilter.insert(MAVLINK_MSG_ID_COMMAND_ACK, false); messageFilter.insert(MAVLINK_MSG_ID_PARAM_SET, false); -- 2.22.0