mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 08:38:53 +08:00
FW Takeoff: fix loiter altitude not set in some cases
* Fix Takeoff mode to respect MIS_TAKEOFF_ALT Takeoff mode never transitions to hold after takeoff alt. * style: run make format
This commit is contained in:
committed by
Mahima Yoga
parent
e841fe029a
commit
15f5fefa0c
@@ -203,6 +203,8 @@ Takeoff::set_takeoff_position()
|
||||
}
|
||||
|
||||
if (!PX4_ISFINITE(_loiter_altitude_msl)) {
|
||||
_loiter_altitude_msl = takeoff_altitude_amsl;
|
||||
|
||||
if (_navigator->get_loiter_min_alt() > FLT_EPSILON) {
|
||||
_loiter_altitude_msl = math::max(_loiter_altitude_msl, takeoff_altitude_amsl + _navigator->get_loiter_min_alt());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user