RTH sanity checking emergency landing fix #7790
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provides full fix related to #7731.
Emergency Landing due to sensor failure during RTH or WP modes auto cancels if sensors working again. Landing can also be cancelled by deselecting RTH and WP modes or selecting AltHold mode.
Emergency Landing caused by RTH Sanity Checking can be cancelled by deselecting RTH mode.
Emergency Landing can't be cancelled if Failsafe is active.
One notable change is to navProcessFSMEvents where the routines for Timeout event and Injected event have been changed and simplified with injected events processed with priority over timeout events. This was done to fix an issue where a change to the
navState
in the timeout event routine (processed first) is incorrectly switched back to thenavState
of the injected event (processed second), e.g. RTH Sanity failure switches to Emergency Landing in the timeout event but is immediately switched back to RTH in the injected event, cancelling the switch to Emergency Landing.Still needs fully testing but Emergency Landing and Nav modes appear to work as expected based on limited fixed wing and multirotor ground testing.
posControl.rthSanityChecker.initialPosition
has been removed since it appears it was never used.