Skip to content

Resolve some todos in code#481

Merged
onur-ozkan merged 4 commits intomavlink:masterfrom
pv42:resolve-todos
Mar 30, 2026
Merged

Resolve some todos in code#481
onur-ozkan merged 4 commits intomavlink:masterfrom
pv42:resolve-todos

Conversation

@pv42
Copy link
Copy Markdown
Contributor

@pv42 pv42 commented Mar 25, 2026

There are some //TODOs in the code that can be removed

//TODO verify this is no longer necessary since we're supporting both mavlink1 and mavlink2; //TODO verify that id_width of u8 is OK even in mavlink v1:

  • We have an explicit error MessageWriteError::MAVLink2Only that check for such cases
  • There is no functional way to generate only MAVLink1 messages right now

// TODO: these lints are produced on a couple of cubepilot messages (..)

  • the cubepilot dialect is fixed
  • unclosed tags should be caught by quickxml, unless selfclosing tags are meant, with are now supported
  • added an assert that fails when a message would have a 0 bytes payload (this is already forbidden since messages must have at least one field)

//TODO check in MavFrame::ser()

  • use a checked int conversion instead, since the function can already panic on incorrect usage that should be fine
  • using the uncheck cast would result in incorect bytes streams when it overflows

@onur-ozkan onur-ozkan merged commit 95ceaf5 into mavlink:master Mar 30, 2026
51 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.

2 participants