mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 18:33:33 +08:00
FW land detector: only force to landed if launch detection is STATE_WAITING_FOR_LAUNCH (#25167)
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -64,9 +64,9 @@ bool FixedwingLandDetector::_get_landed_state()
|
||||
_launch_detection_status_sub.copy(&launch_detection_status);
|
||||
|
||||
// force the landed state to stay landed if we're currently in the catapult/hand-launch launch process. Detect that we are in this state
|
||||
// by checking if the last publication of launch_detection_status is less than 0.5s old, and we're not yet in the flying state.
|
||||
// by checking if the last publication of launch_detection_status is less than 0.5s old, and we're still in the wait for launch state.
|
||||
if (_landed_hysteresis.get_state() && hrt_elapsed_time(&launch_detection_status.timestamp) < 500_ms
|
||||
&& launch_detection_status.launch_detection_state < launch_detection_status_s::STATE_FLYING) {
|
||||
&& launch_detection_status.launch_detection_state == launch_detection_status_s::STATE_WAITING_FOR_LAUNCH) {
|
||||
landDetected = true;
|
||||
|
||||
} else if (hrt_elapsed_time(&_vehicle_local_position.timestamp) < 1_s) {
|
||||
|
||||
Reference in New Issue
Block a user