From e446f375a799d83d4d83121ed8e56f8865898d27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 21 Apr 2013 20:52:50 +1000 Subject: [PATCH] Plane: set loiter.direction for GUIDED mode --- ArduPlane/commands.pde | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ArduPlane/commands.pde b/ArduPlane/commands.pde index 00f4efa781..4f73936ab0 100644 --- a/ArduPlane/commands.pde +++ b/ArduPlane/commands.pde @@ -204,6 +204,12 @@ static void set_next_WP(const struct Location *wp) static void set_guided_WP(void) { + if (g.loiter_radius < 0) { + loiter.direction = -1; + } else { + loiter.direction = 1; + } + // copy the current location into the OldWP slot // --------------------------------------- prev_WP = current_loc;