From 0bea96c3d024a728acee5aaba56ff1c86ef8737d Mon Sep 17 00:00:00 2001 From: jasonshort Date: Fri, 5 Aug 2011 16:19:06 +0000 Subject: [PATCH] Added Jose Julio's Flip code, edited to work with AC2. Never flown or tested! git-svn-id: https://arducopter.googlecode.com/svn/trunk@3020 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/ArduCopterMega.pde | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ArduCopterMega/ArduCopterMega.pde b/ArduCopterMega/ArduCopterMega.pde index b067678596..88312c2e25 100644 --- a/ArduCopterMega/ArduCopterMega.pde +++ b/ArduCopterMega/ArduCopterMega.pde @@ -345,6 +345,11 @@ static float sin_pitch_y, sin_yaw_y, sin_roll_y; static bool simple_bearing_is_set = false; static long initial_simple_bearing; // used for Simple mode +// Acro +#if CH7_OPTION == DO_FLIP +static bool do_flip = false; +#endif + // Airspeed // -------- static int airspeed; // m/s * 100 @@ -1086,6 +1091,13 @@ void update_location(void) void update_current_flight_mode(void) { + #if CH7_OPTION == DO_FLIP + if (do_flip){ + roll_flip(); + return; + } + #endif + if(control_mode == AUTO){ // this is a hack to prevent run up of the throttle I term for alt hold