Skip to content
Snippets Groups Projects
Commit 77958f8f authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

Plane: fixed CONTINUE_AND_CHANGE_ALT command

current_loc should be used, not prev_WP_loc
parent 95d2e793
No related branches found
No related tags found
No related merge requests found
......@@ -514,8 +514,8 @@ static bool verify_continue_and_change_alt()
return true;
}
//Is the next_WP less than 200 m away?
if (get_distance(prev_WP_loc, next_WP_loc) < 200.f) {
// Is the next_WP less than 200 m away?
if (get_distance(current_loc, next_WP_loc) < 200.f) {
//push another 300 m down the line
int32_t next_wp_bearing_cd = get_bearing_cd(prev_WP_loc, next_WP_loc);
location_update(next_WP_loc, next_wp_bearing_cd * 0.01f, 300.f);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment