Mission topic: the autocontinue option was missing

This commit is contained in:
Julian Oes 2013-11-20 22:36:53 +01:00
parent b3c6574500
commit 31f0edd663
2 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,7 @@ void map_mavlink_mission_item_to_mission_item(const mavlink_mission_item_t *mavl
mission_item->nav_cmd = NAV_CMD_WAYPOINT; // TODO correct
mission_item->radius = mavlink_mission_item->param1;
mission_item->time_inside = mavlink_mission_item->param2 / 1e3f; /* from milliseconds to seconds */
mission_item->autocontinue = mavlink_mission_item->autocontinue;
}
void map_mission_item_to_mavlink_mission_item(const struct mission_item_s *mission_item, const uint16_t seq, mavlink_mission_item_t *mavlink_mission_item)
@ -90,6 +91,7 @@ void map_mission_item_to_mavlink_mission_item(const struct mission_item_s *missi
mavlink_mission_item->command = MAV_CMD_NAV_WAYPOINT; // TODO add
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 = seq;
}

View File

@ -79,6 +79,7 @@ struct mission_item_s
enum NAV_CMD nav_cmd; /**< true if loitering is enabled */
float radius; /**< radius in which the mission is accepted as reached in meters */
float time_inside; /**< time that the MAV should stay inside the radius before advancing in seconds */
bool autocontinue; /**< true if next waypoint should follow after this one */
};
struct mission_s