From 5d91b06de30f680452a2fe0bc5f623c8cf1e0322 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 5 Feb 2013 08:57:28 +1100 Subject: [PATCH] RC_Channel: added secondary elevator support --- libraries/RC_Channel/RC_Channel_aux.cpp | 6 +++++- libraries/RC_Channel/RC_Channel_aux.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/RC_Channel/RC_Channel_aux.cpp b/libraries/RC_Channel/RC_Channel_aux.cpp index b06d6ed1c0..e454d76cb0 100644 --- a/libraries/RC_Channel/RC_Channel_aux.cpp +++ b/libraries/RC_Channel/RC_Channel_aux.cpp @@ -12,7 +12,7 @@ const AP_Param::GroupInfo RC_Channel_aux::var_info[] PROGMEM = { // @Param: FUNCTION // @DisplayName: Servo out function // @Description: Setting this to Disabled(0) will disable this output, any other value will enable the corresponding function - // @Values: 0:Disabled,1:Manual,2:Flap,3:Flap_auto,4:Aileron,5:flaperon,6:mount_pan,7:mount_tilt,8:mount_roll,9:mount_open,10:camera_trigger,11:release,12:mount2_pan,13:mount2_tilt,14:mount2_roll,15:mount2_open,16:DifferentialSpoiler1,17:DifferentialSpoiler2,18:AileronWithInput + // @Values: 0:Disabled,1:Manual,2:Flap,3:Flap_auto,4:Aileron,5:flaperon,6:mount_pan,7:mount_tilt,8:mount_roll,9:mount_open,10:camera_trigger,11:release,12:mount2_pan,13:mount2_tilt,14:mount2_roll,15:mount2_open,16:DifferentialSpoiler1,17:DifferentialSpoiler2,18:AileronWithInput,19:Elevator,20:ElevatorWithInput // @User: Standard AP_GROUPINFO("FUNCTION", 1, RC_Channel_aux, function, 0), @@ -75,6 +75,10 @@ void update_aux_servo_function( RC_Channel_aux* rc_a, case RC_Channel_aux::k_aileron_with_input: _aux_channels[i]->set_angle(4500); break; + case RC_Channel_aux::k_elevator: + case RC_Channel_aux::k_elevator_with_input: + _aux_channels[i]->set_angle(4500); + break; case RC_Channel_aux::k_dspoiler1: _aux_channels[i]->set_angle(4500); break; diff --git a/libraries/RC_Channel/RC_Channel_aux.h b/libraries/RC_Channel/RC_Channel_aux.h index 21615ec05c..139061271e 100644 --- a/libraries/RC_Channel/RC_Channel_aux.h +++ b/libraries/RC_Channel/RC_Channel_aux.h @@ -45,6 +45,8 @@ public: k_dspoiler1 = 16, ///< differential spoiler 1 (left wing) k_dspoiler2 = 17, ///< differential spoiler 2 (right wing) k_aileron_with_input = 18, ///< aileron, with rc input + k_elevator = 19, ///< elevator + k_elevator_with_input = 20, ///< elevator, with rc input k_nr_aux_servo_functions ///< This must be the last enum value (only add new values _before_ this one) } Aux_servo_function_t;