Skip to content
Snippets Groups Projects
Commit 4033f11a authored by Randy Mackay's avatar Randy Mackay
Browse files

Copter: report NAV_CONTROLLER_OUTPUT in RTL, Guided

This allows the GCS to display to the user where the vehicle is flying
to in RTL and Guided flight modes
parent 1266a316
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ static void calc_wp_distance() ...@@ -38,7 +38,7 @@ static void calc_wp_distance()
// get target from loiter or wpinav controller // get target from loiter or wpinav controller
if (control_mode == LOITER || control_mode == CIRCLE) { if (control_mode == LOITER || control_mode == CIRCLE) {
wp_distance = wp_nav.get_loiter_distance_to_target(); wp_distance = wp_nav.get_loiter_distance_to_target();
}else if (control_mode == AUTO) { }else if (control_mode == AUTO || control_mode == RTL || (control_mode == GUIDED && guided_mode == Guided_WP)) {
wp_distance = wp_nav.get_wp_distance_to_destination(); wp_distance = wp_nav.get_wp_distance_to_destination();
}else{ }else{
wp_distance = 0; wp_distance = 0;
...@@ -51,7 +51,7 @@ static void calc_wp_bearing() ...@@ -51,7 +51,7 @@ static void calc_wp_bearing()
// get target from loiter or wpinav controller // get target from loiter or wpinav controller
if (control_mode == LOITER || control_mode == CIRCLE) { if (control_mode == LOITER || control_mode == CIRCLE) {
wp_bearing = wp_nav.get_loiter_bearing_to_target(); wp_bearing = wp_nav.get_loiter_bearing_to_target();
} else if (control_mode == AUTO) { } else if (control_mode == AUTO || control_mode == RTL || (control_mode == GUIDED && guided_mode == Guided_WP)) {
wp_bearing = wp_nav.get_wp_bearing_to_destination(); wp_bearing = wp_nav.get_wp_bearing_to_destination();
} else { } else {
wp_bearing = 0; wp_bearing = 0;
......
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