Skip to content

Commit

Permalink
Merge pull request mavlink#421 from dronecore/warn-mission-changes
Browse files Browse the repository at this point in the history
mission: warn if changing takeoff/land to waypoint
  • Loading branch information
julianoes authored Jun 11, 2018
2 parents bc7412f + 6d4757d commit 970242a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/mission/mission_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,11 @@ Mission::Result MissionImpl::build_mission_items(MAV_CMD command,
if (command == MAV_CMD_NAV_WAYPOINT || command == MAV_CMD_NAV_TAKEOFF ||
command == MAV_CMD_NAV_LAND) {
if (new_mission_item->has_position_set()) {
if (command == MAV_CMD_NAV_TAKEOFF) {
LogWarn() << "Converted takeoff mission item to normal waypoint";
} else if (command == MAV_CMD_NAV_LAND) {
LogWarn() << "Converted land mission item to normal waypoint";
}
all_mission_items.push_back(new_mission_item);
new_mission_item = std::make_shared<MissionItem>();
}
Expand Down

0 comments on commit 970242a

Please sign in to comment.