From 575b99b4be5cb7c44308d47cdf1e1f89bfeaecf9 Mon Sep 17 00:00:00 2001 From: Robert Lefebvre Date: Tue, 21 Aug 2012 16:54:01 -0400 Subject: [PATCH] TradHeli: Creating Flybar Acro mode. --- ArduCopter/ArduCopter.pde | 10 ++++++++++ libraries/AP_Motors/AP_MotorsHeli.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 996f13bbc2..0ab5595071 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -1640,8 +1640,18 @@ void update_roll_pitch_mode(void) }else{ // ACRO does not get SIMPLE mode ability + #if FRAME_CONFIG == HELI_FRAME + if (motors.flyarbar_mode == 1){ + g.rc_1.servo_out = g.rc_1.control_in; + g.rc_2.servo_out = g.rc_2.control_in; + } else { + g.rc_1.servo_out = get_acro_roll(g.rc_1.control_in); + g.rc_2.servo_out = get_acro_pitch(g.rc_2.control_in); + } + #else g.rc_1.servo_out = get_acro_roll(g.rc_1.control_in); g.rc_2.servo_out = get_acro_pitch(g.rc_2.control_in); + #endif } break; diff --git a/libraries/AP_Motors/AP_MotorsHeli.h b/libraries/AP_Motors/AP_MotorsHeli.h index cfebef6b3b..a440fb13dd 100644 --- a/libraries/AP_Motors/AP_MotorsHeli.h +++ b/libraries/AP_Motors/AP_MotorsHeli.h @@ -39,6 +39,10 @@ #define AP_MOTORSHELI_RSC_MODE_CH8_PASSTHROUGH 1 #define AP_MOTORSHELI_RSC_MODE_EXT_GOV 2 +// head definitions +#define FLYBARLESS_HEAD 0 +#define FLYBAR_HEAD 1 + class AP_HeliControls;