From 9735a0eff1a16dd408faa82ba3e3706c91ac2c00 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sat, 10 Nov 2012 13:11:11 -0800 Subject: [PATCH] ACM: Allow for user defined roll and pitch input max --- ArduCopter/config.h | 7 +++++++ ArduCopter/radio.pde | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ArduCopter/config.h b/ArduCopter/config.h index 19d4b2eda6..f8175e4afd 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -715,6 +715,13 @@ ////////////////////////////////////////////////////////////////////////////// // Stabilize Rate Control // + +#ifndef MAX_INPUT_ROLL_ANGLE + # define MAX_INPUT_ROLL_ANGLE 4500 +#endif +#ifndef MAX_INPUT_PITCH_ANGLE + # define MAX_INPUT_PITCH_ANGLE 4500 +#endif #ifndef RATE_ROLL_P # define RATE_ROLL_P 0.175 #endif diff --git a/ArduCopter/radio.pde b/ArduCopter/radio.pde index 8c5e761ef5..a0205b7f85 100644 --- a/ArduCopter/radio.pde +++ b/ArduCopter/radio.pde @@ -21,8 +21,8 @@ static void default_dead_zones() static void init_rc_in() { // set rc channel ranges - g.rc_1.set_angle(4500); - g.rc_2.set_angle(4500); + g.rc_1.set_angle(MAX_INPUT_ROLL_ANGLE); + g.rc_2.set_angle(MAX_INPUT_PITCH_ANGLE); #if FRAME_CONFIG == HELI_FRAME // we do not want to limit the movment of the heli's swash plate g.rc_3.set_range(0, 1000);