diff --git a/src/config/config.h b/src/config/config.h index b50899f1f..6c3ed6505 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -217,9 +217,6 @@ // *************retune it back up to where it feels good. I'm finding about 60 to 65% of my previous D value seems to work. // #define TORQUE_BOOST 1.0 -// *************throttle angle compensation in level mode -// #define AUTO_THROTTLE - // *************BRUSHED TARGET MIXER SETTINGS // *************MIX_THROTTLE_REDUCTION_PERCENT reduces thrust imbalances by reducing throttle proportionally to the adjustable reduction percent to the limit set by MIX_THROTTLE_REDUCTION_MAX // *************MIX_THROTTLE_INCREASE_MAX increases the authority of the pid controller at lowest throttle values like airmode when combined with idle up diff --git a/src/flight/control.c b/src/flight/control.c index c471c8922..c57e6f353 100644 --- a/src/flight/control.c +++ b/src/flight/control.c @@ -100,25 +100,6 @@ CBOR_END_STRUCT_ENCODER() #undef ARRAY_MEMBER #undef STR_ARRAY_MEMBER -// throttle angle compensation -static void auto_throttle() { -#ifdef AUTO_THROTTLE - // float autothrottle = fastcos(state.attitude.axis[0] * DEGTORAD) * fastcos(state.attitude.axis[1] * DEGTORAD); - float autothrottle = state.GEstG.axis[2]; - float old_throttle = state.throttle; - if (autothrottle <= 0.5f) - autothrottle = 0.5f; - state.throttle = state.throttle / autothrottle; - // limit to 90% - if (old_throttle < 0.9f) - if (state.throttle > 0.9f) - state.throttle = 0.9f; - - if (state.throttle > 1.0f) - state.throttle = 1.0f; -#endif -} - static void control_flight_mode() { // flight control const vec3_t rates = input_rates_calc(); @@ -430,10 +411,6 @@ void control() { state.throttle += (float)(profile.motor.throttle_boost) * throttlehpf(state.throttle); state.throttle = constrain(state.throttle, 0.0f, 1.0f); } - - if (rx_aux_on(AUX_LEVELMODE)) { - auto_throttle(); - } } motor_mixer_calc(state.motor_mix.axis);