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

GCS_MAVLink: Common: Allow scripting to receive messages which fail CRC check #28248

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

IamPete1
Copy link
Member

This allows scripting to receive messages which the flight controller does not understand. Note that more work is needed to allow sending. This uses ArduPilot/pymavlink#983.

Tested new CRC check with MAVLink 1 and 2. Tested unknown messages by changing the CRC extra of command long in ArduPilot so it would fail its CRC check, it still works as normal in the script.

// This may be a valid message that we don't know the crc extra for, pass it to scripting which might
AP_Scripting *scripting = AP_Scripting::get_singleton();
if (scripting != nullptr) {
scripting->handle_message(msg, chan);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this ignores our usual routing rules from the check_and_forward function. We can't call it because we don't want to learn routes based on messages that failed the crc.

Choose a reason for hiding this comment

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

Maybe allow the subscribe function to pass CRC Extra value in mavlink:register_rx_msgid(msg_id)

@tridge tridge merged commit d7599f2 into ArduPilot:master Oct 1, 2024
96 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.

4 participants