FlightTasks: fix manual mode takeoff

With the new position control architercture manual mode and
potition mode run through the same logic and as a result
it had a throttle thershold for smooth takeoff also in
manual mode. This is fixed by by ignoring the threshold for
any mode which doesn't control the climb rate.
This commit is contained in:
Matthias Grob
2018-04-05 07:30:12 +02:00
committed by Beat Küng
parent 4bf33339dc
commit 2405baa2c9
@@ -2998,7 +2998,7 @@ bool MulticopterPositionControl::manual_wants_takeoff()
const bool has_manual_control_present = _control_mode.flag_control_manual_enabled && _manual.timestamp > 0;
// Manual takeoff is triggered if the throttle stick is above 65%.
return (has_manual_control_present && _manual.z > 0.65f);
return (has_manual_control_present && (_manual.z > 0.65f || !_control_mode.flag_control_climb_rate_enabled));
}
void