Skip to content

Conversation

irajkovic
Copy link
Contributor

Total number of items in a mission should only be updated when mission is downloaded. Downloading geofence or rally points should not affect this total.

@irajkovic
Copy link
Contributor Author

Just as a clarification, function convert_items is also called when downloading geofence, so number of points in geofence would be used to set the number of items in a mission.

@JonasVautherin
Copy link
Collaborator

Thanks! Would you mind fixing the style with ./tools/fix_style.sh?

@irajkovic irajkovic force-pushed the fix-mission-progress-total branch from 12b6bbf to 68ffa73 Compare September 30, 2025 13:23
@irajkovic
Copy link
Contributor Author

Pushed forced after reformatting the code. I only formatted my changes though, clang-format also reformatted unrelated file: ./tools/fix_style.sh that I didn't want to include in this commit as it's unrelated. Let me know if it's ok now.

JonasVautherin
JonasVautherin previously approved these changes Sep 30, 2025
Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Sounds reasonable to me, but I'll let @julianoes review 😇

auto converted_result = convert_result(result);
auto converted_items = convert_items(int_items);

{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{
if (converted_result == MissionRaw::Result::Success) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for suggestion, added to the original commit.

auto converted_result = convert_result(result);
auto converted_items = convert_items(items);

{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{
if (converted_result == MissionRaw::Result::Success) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above.

Total number of items in a mission should only be updated when
mission is downloaded. Downloading geofence or rally points
should not affect this total.
Copy link

sonarqubecloud bot commented Oct 5, 2025

@julianoes
Copy link
Collaborator

Thanks @irajkovic.

@julianoes julianoes merged commit fc0d3a5 into mavlink:main Oct 6, 2025
53 of 54 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