From 214d60abb9d43c551f83fdf32e6bca62e809a3e5 Mon Sep 17 00:00:00 2001 From: Robert Lefebvre Date: Fri, 7 Aug 2015 19:58:49 -0400 Subject: [PATCH] AP_MotorsHeli: Create RSC_IDLE param --- libraries/AP_Motors/AP_MotorsHeli.cpp | 8 ++++++++ libraries/AP_Motors/AP_MotorsHeli.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/libraries/AP_Motors/AP_MotorsHeli.cpp b/libraries/AP_Motors/AP_MotorsHeli.cpp index 1ce44822e7..38d451905e 100644 --- a/libraries/AP_Motors/AP_MotorsHeli.cpp +++ b/libraries/AP_Motors/AP_MotorsHeli.cpp @@ -128,6 +128,14 @@ const AP_Param::GroupInfo AP_MotorsHeli::var_info[] PROGMEM = { // @User: Standard AP_GROUPINFO("RSC_CRITICAL", 12, AP_MotorsHeli, _rsc_critical, AP_MOTORS_HELI_RSC_CRITICAL), + // @Param: RSC_IDLE + // @DisplayName: Rotor Speed Output at Idle + // @Description: Rotor speed output while armed but rotor control speed is not engaged + // @Range: 0 500 + // @Increment: 10 + // @User: Standard + AP_GROUPINFO("RSC_IDLE", 13, AP_MotorsHeli, _rsc_idle, AP_MOTORS_HELI_RSC_IDLE_DEFAULT), + AP_GROUPEND }; diff --git a/libraries/AP_Motors/AP_MotorsHeli.h b/libraries/AP_Motors/AP_MotorsHeli.h index 6f2613233b..21ff0c8ed2 100644 --- a/libraries/AP_Motors/AP_MotorsHeli.h +++ b/libraries/AP_Motors/AP_MotorsHeli.h @@ -47,6 +47,9 @@ // default main rotor critical speed #define AP_MOTORS_HELI_RSC_CRITICAL 500 +// default main rotor idle speed +#define AP_MOTORS_HELI_RSC_IDLE_DEFAULT 0 + // default main rotor ramp up time in seconds #define AP_MOTORS_HELI_RSC_RAMP_TIME 1 // 1 second to ramp output to main rotor ESC to full power (most people use exterrnal govenors so we can ramp up quickly) #define AP_MOTORS_HELI_RSC_RUNUP_TIME 10 // 10 seconds for rotor to reach full speed @@ -219,6 +222,7 @@ protected: AP_Int8 _rsc_runup_time; // Time in seconds for the main rotor to reach full speed. Must be longer than _rsc_ramp_time AP_Int16 _land_collective_min; // Minimum collective when landed or landing AP_Int16 _rsc_critical; // Rotor speed below which flight is not possible + AP_Int16 _rsc_idle; // Rotor speed output while at idle // internal variables float _rollFactor[AP_MOTORS_HELI_NUM_SWASHPLATE_SERVOS];