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

AP_Mission: DO_RETURN_PATH_START limit worst case runtime #28608

Merged

Conversation

IamPete1
Copy link
Member

If you fill your mission with DO_RETURN_PATH_START way-points the best rejoin location calculation will take so long that the flight controller watchdogs.

This adds a worst case limit of 1000 search points. The limit used to be 254 points per DO_RETURN_PATH_START, the the new limit is equivalent to four maximum length return path options. This change allows a single path to be longer.

#28574

// Go through mission and check each DO_RETURN_PATH_START
for (uint16_t i = 1; i < num_commands(); i++) {
Mission_Command tmp;
if (read_cmd_from_storage(i, tmp) && (tmp.id == MAV_CMD_DO_RETURN_PATH_START)) {
if (get_command_id(i) == uint16_t(MAV_CMD_DO_RETURN_PATH_START)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a efficiency saving, we were only checking the ID, so we don't need the full command.

@tridge tridge merged commit 5e7463f into ArduPilot:master Nov 26, 2024
99 checks passed
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.

3 participants