mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 11:23:06 +08:00
FW Takeoff: fix loiter altitude not set in some cases
Build all targets / Scan for Board Targets (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
Build all targets / Scan for Board Targets (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
* 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