mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 22:34:07 +08:00
RTLDirect: check for terrain collision in every state of RTL beside when landing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
588c4a04c8
commit
a737036633
@ -104,8 +104,9 @@ void RtlDirect::on_active()
|
||||
set_rtl_item();
|
||||
}
|
||||
|
||||
if (_rtl_state == RTLState::LOITER_HOLD) { //TODO: rename _rtl_state to _rtl_state_next
|
||||
if (_rtl_state != RTLState::IDLE) { //TODO: rename _rtl_state to _rtl_state_next (when in IDLE we're actually in LAND)
|
||||
//check for terrain collision and update altitude if needed
|
||||
// note: it may trigger multiple times during a RTL, as every time the altitude set is reset
|
||||
updateAltToAvoidTerrainCollisionAndRepublishTriplet(_mission_item);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user