Copter: fix do_loiter when executed in same location

This commit is contained in:
Francisco Ferreira 2016-05-12 10:16:58 +01:00 committed by Randy Mackay
parent 8ce8551669
commit 8fb318a6e1
1 changed files with 3 additions and 1 deletions

View File

@ -361,7 +361,9 @@ void Copter::do_loiter_unlimited(const AP_Mission::Mission_Command& cmd)
// To-Do: make this simpler // To-Do: make this simpler
Vector3f temp_pos; Vector3f temp_pos;
wp_nav.get_wp_stopping_point_xy(temp_pos); wp_nav.get_wp_stopping_point_xy(temp_pos);
target_loc.offset(temp_pos.x * 100.0f, temp_pos.y * 100.0f); Location_Class temp_loc(temp_pos);
target_loc.lat = temp_loc.lat;
target_loc.lng = temp_loc.lng;
} }
// use current altitude if not provided // use current altitude if not provided