mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
land detector: commented takeoff throttle values for each mode
This commit is contained in:
committed by
Lorenz Meier
parent
5f3cbbbbc2
commit
f95fb0f20f
@@ -239,14 +239,21 @@ bool MulticopterLandDetector::_get_landed_state()
|
||||
|
||||
float MulticopterLandDetector::get_takeoff_throttle()
|
||||
{
|
||||
/* Position mode */
|
||||
if (_control_mode.flag_control_manual_enabled && _control_mode.flag_control_position_enabled) {
|
||||
/* Should be above 0.5 because below that we do not gain altitude and won't take off.
|
||||
* Also it should be quite high such that we don't accidentally take off when using
|
||||
* a spring loaded throttle and have a useful vertical speed to start with. */
|
||||
return 0.75f;
|
||||
}
|
||||
|
||||
/* Manual/attitude mode */
|
||||
if (_control_mode.flag_control_manual_enabled && _control_mode.flag_control_attitude_enabled) {
|
||||
/* Should be quite low and certainly below hover throttle because pilot controls throttle manually. */
|
||||
return 0.15f;
|
||||
}
|
||||
|
||||
/* As default for example in acro mode we do not want to stay landed. */
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ private:
|
||||
uint64_t _min_trust_start; ///< timestamp when minimum trust was applied first
|
||||
uint64_t _arming_time;
|
||||
|
||||
// get pilot throttle threshold with which we should quit landed state and take off
|
||||
/* get control mode dependent pilot throttle threshold with which we should quit landed state and take off */
|
||||
float get_takeoff_throttle();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user