Skip to content

Conversation

@julianoes
Copy link
Collaborator

This fixes the problem that MAVSDK did not forward messages which it had not seen before. This could happen when:

  • A message is added in a later version of MAVLink whchi MAVSDK hasn't shipped with,
  • A custom message needs to be forwarded that MAVSDK doesn't know about.

@julianoes julianoes force-pushed the pr-forward-unknown-messages branch from 48f8b59 to e7ba310 Compare August 4, 2025 04:47
@julianoes julianoes force-pushed the pr-forward-unknown-messages branch from e7ba310 to 4de47b5 Compare August 4, 2025 04:54
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 4, 2025

Copy link
Collaborator Author

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

Self reviewed again, I think it's ok.

#if defined(LINUX) || defined(APPLE)
send_len = static_cast<int>(write(_fd, bytes, length));
#else
if (!WriteFile(_handle, bytes, static_cast<DWORD>(length), LPDWORD(&send_len), NULL)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a Windows function? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe so. It was there before, it just moved.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh you're right. So I guess we don't use this function on iOS or Android 🤷

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No idea.

@julianoes julianoes merged commit 3a9af63 into main Aug 14, 2025
72 of 76 checks passed
@julianoes julianoes deleted the pr-forward-unknown-messages branch August 14, 2025 00:13
@hamishwillee
Copy link
Collaborator

This is cool!

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