diff --git a/libraries/AP_Mission/AP_Mission.cpp b/libraries/AP_Mission/AP_Mission.cpp index e50eb809b5..fc5ed4a204 100644 --- a/libraries/AP_Mission/AP_Mission.cpp +++ b/libraries/AP_Mission/AP_Mission.cpp @@ -531,6 +531,10 @@ bool AP_Mission::mavlink_to_mission_cmd(const mavlink_mission_item_t& packet, AP case MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT: // MAV ID: 30 copy_location = true; // only using alt + cmd.p1 = packet.param1; // Climb/Descend + // 0 = Neutral, cmd complete at +/- 5 of indicated alt. + // 1 = Climb, cmd complete at or above indicated alt. + // 2 = Descend, cmd complete at or below indicated alt. break; case MAV_CMD_NAV_LOITER_TO_ALT: // MAV ID: 31 @@ -849,7 +853,11 @@ bool AP_Mission::mission_cmd_to_mavlink(const AP_Mission::Mission_Command& cmd, break; case MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT: // MAV ID: 30 - copy_location = true; //only using alt. + copy_location = true; //only using alt + packet.param1 = cmd.p1; // Climb/Descend + // 0 = Neutral, cmd complete at +/- 5 of indicated alt. + // 1 = Climb, cmd complete at or above indicated alt. + // 2 = Descend, cmd complete at or below indicated alt. break; case MAV_CMD_NAV_LOITER_TO_ALT: // MAV ID: 31