diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index 10f7faa269..cbeabdf260 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -32,6 +32,9 @@ Copter::Copter(void) : control_mode(STABILIZE), #if FRAME_CONFIG == HELI_FRAME // helicopter constructor requires more arguments motors(g.rc_7, g.heli_servo_rsc, g.heli_servo_1, g.heli_servo_2, g.heli_servo_3, g.heli_servo_4, MAIN_LOOP_RATE), + + // ToDo: Input Manager is only used by Heli for 3.3, but will be used by all frames for 3.4 + input_manager(MAIN_LOOP_RATE), #elif FRAME_CONFIG == TRI_FRAME // tri constructor requires additional rc_7 argument to allow tail servo reversing motors(MAIN_LOOP_RATE), #elif FRAME_CONFIG == SINGLE_FRAME // single constructor requires extra servos for flaps diff --git a/ArduCopter/Copter.h b/ArduCopter/Copter.h index 27e4f53f95..0efeece4d0 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -105,6 +105,8 @@ #include // Landing Gear library #include #include +#include // Pilot input handling library +#include // Heli specific pilot input handling library // AP_HAL to Arduino compatibility layer // Configuration @@ -491,6 +493,13 @@ private: AP_Terrain terrain; #endif + // Pilot Input Management Library + // Only used for Helicopter for AC3.3, to be expanded to include Multirotor + // child class for AC3.4 +#if FRAME_CONFIG == HELI_FRAME + AC_InputManager_Heli input_manager; +#endif + // use this to prevent recursion during sensor init bool in_mavlink_delay; diff --git a/ArduCopter/Parameters.cpp b/ArduCopter/Parameters.cpp index f4fb5d3903..67611c34db 100644 --- a/ArduCopter/Parameters.cpp +++ b/ArduCopter/Parameters.cpp @@ -879,6 +879,12 @@ const AP_Param::Info Copter::var_info[] PROGMEM = { // @Path: ../libraries/AP_LandingGear/AP_LandingGear.cpp GOBJECT(landinggear, "LGR_", AP_LandingGear), +#if FRAME_CONFIG == HELI_FRAME + // @Group: IM_ + // @Path: ../libraries/AC_InputManager_Heli.cpp + GOBJECT(input_manager, "IM_", AC_InputManager_Heli), +#endif + // @Group: COMPASS_ // @Path: ../libraries/AP_Compass/Compass.cpp GOBJECT(compass, "COMPASS_", Compass), diff --git a/ArduCopter/Parameters.h b/ArduCopter/Parameters.h index aefcfa4870..29d0aaae4d 100644 --- a/ArduCopter/Parameters.h +++ b/ArduCopter/Parameters.h @@ -82,6 +82,9 @@ public: // Landing gear object k_param_landinggear, // 18 + // Input Management object + k_param_input_manager, // 19 FULL! + // Misc // k_param_log_bitmask_old = 20, // Deprecated