mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 16:13:33 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user