Skip to content

Conversation

mahima-yoga
Copy link
Contributor

Solved Problem

When auto-landing while the current nav_state is set to a takeoff mode, the nav_state after disarming reverts to takeoff. On the next arming, the vehicle immediately initiates takeoff

Solution

  • Prevent _nav_state_after_disarming from being set to an auto-takeoff state by adding a check for takeoff modes.

Changelog Entry

For release notes:

Feature/Bugfix Prevent nav_state_after_disarming from being set to a takeoff mode.

Alternatives

Open to alternative solutions

Test coverage

  • Tested in SITL:
NAVIGATION_STATE_POSCTL = 2   
NAVIGATION_STATE_AUTO_TAKEOFF = 17        
NAVIGATION_STATE_AUTO_LAND = 18  
image

@mahima-yoga mahima-yoga requested a review from dakejahl October 10, 2025 11:35
Copy link
Contributor

@dakejahl dakejahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@dakejahl dakejahl self-assigned this Oct 10, 2025
@dakejahl dakejahl merged commit 9690463 into main Oct 10, 2025
69 of 73 checks passed
@dakejahl dakejahl deleted the pr-prevent_takeoff_state_after_landing branch October 10, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants