Plane: make a throttle_cruise of 0 mean always zero throttle

this can be used for parachute landing missions

Thanks to Chris Miser for the suggestion
This commit is contained in:
Andrew Tridgell 2013-03-08 14:59:19 +11:00
parent 0bf6a52f7a
commit e93888dee9

View File

@ -231,6 +231,14 @@ static void crash_checker()
static void calc_throttle()
{
if (g.throttle_cruise <= 1) {
// user has asked for zero throttle - this may be done by a
// mission which wants to turn off the engine for a parachute
// landing
g.channel_throttle.servo_out = 0;
return;
}
if (!alt_control_airspeed()) {
int16_t throttle_target = g.throttle_cruise + throttle_nudge;