Sub: scale get_pilot_desired_climb_rate() deadzone and output with pilot gain

This commit is contained in:
Willian Galvani 2023-10-31 17:59:34 -03:00
parent 3ba63d33d5
commit 622ddcf47a
2 changed files with 3 additions and 3 deletions

View File

@ -96,8 +96,8 @@ float Sub::get_pilot_desired_climb_rate(float throttle_control)
float desired_rate = 0.0f;
float mid_stick = channel_throttle->get_control_mid();
float deadband_top = mid_stick + g.throttle_deadzone;
float deadband_bottom = mid_stick - g.throttle_deadzone;
float deadband_top = mid_stick + g.throttle_deadzone * gain;
float deadband_bottom = mid_stick - g.throttle_deadzone * gain;
// ensure a reasonable throttle value
throttle_control = constrain_float(throttle_control,0.0f,1000.0f);

View File

@ -271,7 +271,7 @@ const AP_Param::Info Sub::var_info[] = {
// @Param: JS_THR_GAIN
// @DisplayName: Throttle gain scalar
// @Description: Scalar for gain on the throttle channel
// @Description: Scalar for gain on the throttle channel. Gets scaled with the current JS gain
// @User: Standard
// @Range: 0.5 4.0
GSCALAR(throttle_gain, "JS_THR_GAIN", 1.0f),