Skip to content

Plane: fixed fence re-enable after fence breach #29730

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

Merged
merged 3 commits into from
Apr 10, 2025

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Apr 9, 2025

If after a fence breach the user commands a WP change to a WP not in the landing sequence in AUTO mode or disables and re-enables the fence then the fence should be re-activated

@IamPete1
Copy link
Member

IamPete1 commented Apr 9, 2025

May as well update this to use the new enum value too.

plane.previous_mode_reason = ModeReason::UNKNOWN;

@tridge
Copy link
Contributor Author

tridge commented Apr 9, 2025

May as well update this to use the new enum value too.

done

@@ -193,6 +203,11 @@ bool Plane::fence_stickmixing(void) const

bool Plane::in_fence_recovery() const
{
if (control_mode == &mode_auto && !mission.get_in_landing_sequence_flag()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I was surprised to see that on master we have a separate boolean for in_return_path() - I think we might need a clause in here for that state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is tricky to see how that will work, the flag gets set even if we're not using RET_AUTOLAND=4
we'd need to check for the flag not being set

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should say the current patches are a significant improvement and create an issue for this case, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I think so

@peterbarker peterbarker merged commit 2a5e9d9 into ArduPilot:master Apr 10, 2025
118 of 120 checks passed
@rmackay9 rmackay9 moved this from Pending to 4.6.0-beta6 in 4.6 Backports Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 4.6.0-beta6
Development

Successfully merging this pull request may close these issues.

4 participants