From a2b338c052bfd63c2a93015939cec2f332cc8680 Mon Sep 17 00:00:00 2001 From: Adam M Rivera Date: Sun, 15 Apr 2012 16:55:34 -0500 Subject: [PATCH] System: Added handler for the new APPROACH flight mode which will initiate an approach to a target alt as defined by the user. --- ArduCopter/system.pde | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index e0d975b37b..b8a63b8a30 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -484,6 +484,13 @@ static void set_mode(byte mode) do_land(); break; + case APPROACH: + yaw_mode = LOITER_YAW; + roll_pitch_mode = LOITER_RP; + throttle_mode = THROTTLE_AUTO; + do_approach(); + break; + case RTL: yaw_mode = RTL_YAW; roll_pitch_mode = RTL_RP;