From f54a13f24bb7925453691ad62731bbd292db9ab0 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 6 Jan 2015 16:38:34 +0900 Subject: [PATCH] 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 --- ArduCopter/navigation.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index 92f702e999..1d700d6576 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -38,7 +38,7 @@ static void calc_wp_distance() // get target from loiter or wpinav controller if (control_mode == LOITER || control_mode == CIRCLE) { 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(); }else{ wp_distance = 0; @@ -51,7 +51,7 @@ static void calc_wp_bearing() // get target from loiter or wpinav controller if (control_mode == LOITER || control_mode == CIRCLE) { 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(); } else { wp_bearing = 0;