Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failsafe behavior after RC loss and mode switch #24424

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haumarco
Copy link
Contributor

Solved Problem

Scenario:
- drone in altitude mode and switches to RTL failsafe after RC loss
- while in RTL, the user selects "position mode", the vehicle command gets rejected because of missing manual mode
- the vehicle switches to altitude mode, despite not having any manual control input!

Solution

I removed the _had_mode_change = true; which always indicated that the "intended mode" has change even when it got rejected.

Now the scenario would look like:
- drone in altitude mode and switches to RTL failsafe after RC loss
- while in RTL, the user selects "position mode", the vehicle command gets rejected because of missing manual mode
- the vehicle stays in RTL
- RC connects again, vehicle stays in RTL until mode gets switched again or switches to position mode if user gives stick input (depending on COM_RC_STICK_OV)

@haumarco haumarco requested review from MaEtUgR and sfuhrer February 27, 2025 14:38
@haumarco
Copy link
Contributor Author

@sfuhrer @MaEtUgR please also try to break the logic with different scenarios (mode changes, failsafes etc.) that you can think of...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant