diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-12-23 16:58:27 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-12-23 16:58:27 +0100 |
commit | 94b68aa1cc2f6fedd625d2b5ac7edc04b67d3749 (patch) | |
tree | dca7cfabc5a380634f2702a6b097d730d7eae414 /src | |
parent | 546964332d5eb3c9e402e39a136fc6c6994c00f6 (diff) | |
download | px4-firmware-94b68aa1cc2f6fedd625d2b5ac7edc04b67d3749.tar.gz px4-firmware-94b68aa1cc2f6fedd625d2b5ac7edc04b67d3749.tar.bz2 px4-firmware-94b68aa1cc2f6fedd625d2b5ac7edc04b67d3749.zip |
add missing conversion from mission item to mavlink mission item after changes from b7652986d9cc0fe3edc765e3485b696b4b639b03
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/mavlink/waypoints.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/mavlink/waypoints.c b/src/modules/mavlink/waypoints.c index b72086a7f..0998cd5eb 100644 --- a/src/modules/mavlink/waypoints.c +++ b/src/modules/mavlink/waypoints.c @@ -133,6 +133,15 @@ int map_mission_item_to_mavlink_mission_item(const struct mission_item_s *missio mavlink_mission_item->frame = MAV_FRAME_GLOBAL_RELATIVE_ALT; } + switch (mission_item->nav_cmd) { + case NAV_CMD_TAKEOFF: + mavlink_mission_item->param1 = mission_item->pitch_min; + break; + default: + mavlink_mission_item->param1 = mission_item->radius; + break; + } + mavlink_mission_item->x = (float)mission_item->lat; mavlink_mission_item->y = (float)mission_item->lon; mavlink_mission_item->z = mission_item->altitude; @@ -140,7 +149,6 @@ int map_mission_item_to_mavlink_mission_item(const struct mission_item_s *missio mavlink_mission_item->param4 = mission_item->yaw*M_RAD_TO_DEG_F; mavlink_mission_item->param3 = mission_item->loiter_radius*(float)mission_item->loiter_direction; mavlink_mission_item->command = mission_item->nav_cmd; - mavlink_mission_item->param1 = mission_item->radius; mavlink_mission_item->param2 = mission_item->time_inside * 1e3f; /* from seconds to milliseconds */ mavlink_mission_item->autocontinue = mission_item->autocontinue; mavlink_mission_item->seq = mission_item->index; |