diff --git a/APMrover2/mode_guided.cpp b/APMrover2/mode_guided.cpp index a40567e9f8..098f016b8b 100644 --- a/APMrover2/mode_guided.cpp +++ b/APMrover2/mode_guided.cpp @@ -121,8 +121,7 @@ float ModeGuided::get_distance_to_destination() const case Guided_TurnRateAndSpeed: return 0.0f; case Guided_Loiter: - rover.mode_loiter.get_distance_to_destination(); - break; + return rover.mode_loiter.get_distance_to_destination(); } // we should never reach here but just in case, return 0