Files
PX4-Autopilot/docs
Andrea BernasconiandAnil Kircaliali 70a735246f fix(failsafe): let GNSS loss recover during the Hold delay (#29814)
* fix(failsafe): allow GNSS loss to recover during the Hold delay

A GNSS failure that clears during the COM_FAIL_ACT_T Hold still latched
Return or Land, because COM_GNSSLOSS_ACT uses the OnModeChangeOrDisarm
clear condition. The vehicle then abandoned a mission it could have
continued.

If the failure clears while the vehicle is still holding, the action is
dropped and the user-intended mode continues, e.g. the mission resumes.
Once Return or Land has started, it stays latched as before. With
COM_FAIL_ACT_T=0 there is no Hold, so nothing changes.

Assisted-by: Claude:claude-opus-5-5

* fix(failsafe): restart the Hold delay after a failure clears during it

When a failsafe cleared during its Hold delay, the remaining delay kept
counting down. A new failure within that time did not reload it and only
got what was left, so it could Return almost without a Hold.

Reset the delay once no failsafe is pending, so that the next failure
gets the full COM_FAIL_ACT_T again. This applies to every failsafe.
Repeated failures still escalate: the start delay shrinks while a Hold
is active and refills at a quarter of that rate.

Assisted-by: Claude:claude-opus-5-5

* revert(failsafe): keep the remaining Hold delay after a failure clears

This reverts commit 5e9a8e8a14.

Restarting the delay for every new failure changed how a flapping
condition is handled, for every failsafe and not only GNSS. Without the
reset, a failure that comes back keeps the delay left over from the
previous one, so the action still fires on time. With it, only the start
delay escalation limits the flapping, which can take much longer, or
never fire if the condition is active less than a fifth of the time.

Keep the PR scoped to letting GNSS loss recover during the Hold.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

* fix(failsafe): only clear GNSS loss during the Hold delay before Return starts

_current_delay is shared between failsafes. If another failsafe with a
delay is added on the same update as GNSS recovers, it re-arms the delay
and the GNSS Return or Land that was already running got removed.

Also require that the selected action is not beyond Hold yet.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>

---------

Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
Co-authored-by: Anil Kircaliali <anil.kircaliali@auterion.com>
2026-11-18 09:38:57 +01:00
..
2026-11-17 17:43:09 +00:00
…
…
…
…
…
…

PX4 User Guide

This repo contains the source code for the PX4 User Guide.

Note

Contributions and Translations to this guide are very welcome!