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

include multiple encoding errors in OPEN_DRONE_ID_ARM_STATUS message #102

Merged

Conversation

BluemarkInnovations
Copy link
Contributor

In the current implementation, the check_parse fails on the first error whenit encounters bad data in one of the RID packets.

In this PR, the function will collect all bad data errors and include the packets that fail in in the ARM status error field. This is useful in case the data stream has multiple errors. For instance if the system message has an error and the operator ID too, the current implementation would only return that the system message fails.

Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

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

it would be good to use strncat() instead of strcat() in case we end up with enough to overflow
should we use shorter names? like "SYS" for system?

@BluemarkInnovations
Copy link
Contributor Author

BluemarkInnovations commented Mar 14, 2023

Implemented a new PR with the requested changes.

  • strncat is limited usable. The count applies to the source, not to the destination bytes.
  • overflow of buffers is avoided.
  • included Transport::arm_status_check function too.

@tridge
Copy link
Contributor

tridge commented Mar 24, 2023

needs a rebase, sorry

@BluemarkInnovations
Copy link
Contributor Author

did a rebase and squashed the commits.

@BluemarkInnovations
Copy link
Contributor Author

Seems to be ready for merge, see comment April 3.

@tridge
Copy link
Contributor

tridge commented Oct 14, 2023

@BluemarkInnovations i've cleaned up the string handling a bit

@tridge tridge merged commit 4dea4e6 into ArduPilot:master Oct 14, 2023
1 check 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.

2 participants