Plane: allow zero throttle in LAND_STAGE_FINAL

This commit is contained in:
Andrew Tridgell 2014-08-30 05:15:25 +10:00
parent a6ca11facf
commit 5c96838473
2 changed files with 8 additions and 4 deletions

View File

@ -805,9 +805,13 @@ static void set_servos(void)
channel_throttle->servo_out = 0;
#else
// convert 0 to 100% into PWM
uint8_t min_throttle = aparm.throttle_min.get();
if (control_mode == AUTO && flight_stage == AP_SpdHgtControl::FLIGHT_LAND_FINAL) {
min_throttle = 0;
}
channel_throttle->servo_out = constrain_int16(channel_throttle->servo_out,
aparm.throttle_min.get(),
aparm.throttle_max.get());
min_throttle,
aparm.throttle_max.get());
if (suppress_throttle()) {
// throttle is suppressed in auto mode

View File

@ -425,7 +425,7 @@ const AP_Param::Info var_info[] PROGMEM = {
// @Param: THR_MIN
// @DisplayName: Minimum Throttle
// @Description: The minimum throttle setting to which the autopilot will apply.
// @Description: The minimum throttle setting (as a percentage) which the autopilot will apply. For the final stage of an automatic landing this is always zero.
// @Units: Percent
// @Range: 0 100
// @Increment: 1
@ -434,7 +434,7 @@ const AP_Param::Info var_info[] PROGMEM = {
// @Param: THR_MAX
// @DisplayName: Maximum Throttle
// @Description: The maximum throttle setting as a percentage which the autopilot will apply.
// @Description: The maximum throttle setting (as a percentage) which the autopilot will apply.
// @Units: Percent
// @Range: 0 100
// @Increment: 1