mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 01:41:36 +08:00
mc landdetector: simplify return
This commit is contained in:
committed by
Lorenz Meier
parent
8a76bd07d0
commit
8f7ebc1f3a
@@ -266,11 +266,8 @@ bool MulticopterLandDetector::_get_landed_state()
|
|||||||
{
|
{
|
||||||
// if we have maybe_landed, the mc_pos_control goes into idle (thrust_sp = 0.0)
|
// if we have maybe_landed, the mc_pos_control goes into idle (thrust_sp = 0.0)
|
||||||
// therefore check if all other condition of the landed state remain true
|
// therefore check if all other condition of the landed state remain true
|
||||||
if (_maybe_landed_hysteresis.get_state()) {
|
return _maybe_landed_hysteresis.get_state();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float MulticopterLandDetector::_get_takeoff_throttle()
|
float MulticopterLandDetector::_get_takeoff_throttle()
|
||||||
|
|||||||
Reference in New Issue
Block a user