MAVLink: Update to version 2 compaat API

This commit is contained in:
Lorenz Meier
2016-05-19 20:13:32 +02:00
parent c6aa1b1efb
commit 0a597d0d62
9 changed files with 144 additions and 133 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
* Copyright (c) 2012-2016 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -188,7 +188,7 @@ MavlinkMissionManager::send_mission_ack(uint8_t sysid, uint8_t compid, uint8_t t
wpa.target_component = compid;
wpa.type = type;
_mavlink->send_message(MAVLINK_MSG_ID_MISSION_ACK, &wpa);
mavlink_msg_mission_ack_send_struct(_mavlink->get_channel(), &wpa);
if (_verbose) { warnx("WPM: Send MISSION_ACK type %u to ID %u", wpa.type, wpa.target_system); }
}
@@ -202,7 +202,7 @@ MavlinkMissionManager::send_mission_current(uint16_t seq)
wpc.seq = seq;
_mavlink->send_message(MAVLINK_MSG_ID_MISSION_CURRENT, &wpc);
mavlink_msg_mission_current_send_struct(_mavlink->get_channel(), &wpc);
} else if (seq == 0 && _count == 0) {
/* don't broadcast if no WPs */
@@ -226,7 +226,7 @@ MavlinkMissionManager::send_mission_count(uint8_t sysid, uint8_t compid, uint16_
wpc.target_component = compid;
wpc.count = _count;
_mavlink->send_message(MAVLINK_MSG_ID_MISSION_COUNT, &wpc);
mavlink_msg_mission_count_send_struct(_mavlink->get_channel(), &wpc);
if (_verbose) { warnx("WPM: Send MISSION_COUNT %u to ID %u", wpc.count, wpc.target_system); }
}
@@ -250,7 +250,7 @@ MavlinkMissionManager::send_mission_item(uint8_t sysid, uint8_t compid, uint16_t
wp.seq = seq;
wp.current = (_current_seq == seq) ? 1 : 0;
_mavlink->send_message(MAVLINK_MSG_ID_MISSION_ITEM, &wp);
mavlink_msg_mission_item_send_struct(_mavlink->get_channel(), &wp);
if (_verbose) { warnx("WPM: Send MISSION_ITEM seq %u to ID %u", wp.seq, wp.target_system); }
@@ -276,7 +276,7 @@ MavlinkMissionManager::send_mission_request(uint8_t sysid, uint8_t compid, uint1
wpr.target_component = compid;
wpr.seq = seq;
_mavlink->send_message(MAVLINK_MSG_ID_MISSION_REQUEST, &wpr);
mavlink_msg_mission_request_send_struct(_mavlink->get_channel(), &wpr);
if (_verbose) { warnx("WPM: Send MISSION_REQUEST seq %u to ID %u", wpr.seq, wpr.target_system); }
@@ -295,7 +295,7 @@ MavlinkMissionManager::send_mission_item_reached(uint16_t seq)
wp_reached.seq = seq;
_mavlink->send_message(MAVLINK_MSG_ID_MISSION_ITEM_REACHED, &wp_reached);
mavlink_msg_mission_item_reached_send_struct(_mavlink->get_channel(), &wp_reached);
if (_verbose) { warnx("WPM: Send MISSION_ITEM_REACHED reached_seq %u", wp_reached.seq); }
}