From 2883ec856a578a38f7f993bcb52c9cf9acd18078 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 15 Jan 2023 10:36:56 +1100 Subject: [PATCH] Plane: fixed loiter.direction for VTOL approach ensure the direction is setup correctly for both CW and CCW --- ArduPlane/commands_logic.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index 14cd542c4c..6d2763d494 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -1019,6 +1019,8 @@ bool Plane::verify_landing_vtol_approach(const AP_Mission::Mission_Command &cmd) const int8_t direction = is_negative(radius) ? -1 : 1; const float abs_radius = fabsf(radius); + loiter.direction = direction; + switch (vtol_approach_s.approach_stage) { case RTL: {