Plane: on takeoff set prev_WP_loc to current_loc

This commit is contained in:
Andrew Tridgell 2015-01-03 10:36:14 +11:00
parent 6bb4a8c361
commit 1e3c23e5a3
1 changed files with 1 additions and 0 deletions

View File

@ -304,6 +304,7 @@ static void do_RTL(void)
static void do_takeoff(const AP_Mission::Mission_Command& cmd)
{
prev_WP_loc = current_loc;
set_next_WP(cmd.content.location);
// pitch in deg, airspeed m/s, throttle %, track WP 1 or 0
auto_state.takeoff_pitch_cd = (int16_t)cmd.p1 * 100;