Skip to content

mavlink_direct: handle (u)int > 2^32#2680

Merged
julianoes merged 4 commits intomainfrom
pr-int64-json
Oct 7, 2025
Merged

mavlink_direct: handle (u)int > 2^32#2680
julianoes merged 4 commits intomainfrom
pr-int64-json

Conversation

@julianoes
Copy link
Copy Markdown
Collaborator

It turns out jsoncpp uses isUInt for numbers below 2^32 and isUInt64 for numbers above 2^32.

Fixes #2679.

It turns out jsoncpp uses isUInt for numbers below 2^32 and isUInt64 for
numbers above 2^32.
Just in case, to make sure big numbers get handled correctly.
Turns out libmavlike does all the casting already.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Oct 7, 2025

@julianoes julianoes merged commit cafb83c into main Oct 7, 2025
54 checks passed
@julianoes julianoes deleted the pr-int64-json branch October 7, 2025 23:57
@reedev
Copy link
Copy Markdown
Contributor

reedev commented Oct 8, 2025

Nice cleanup. Did you test with a small number in a uin64 for instance? That's how I encountered the issue.

@julianoes
Copy link
Copy Markdown
Collaborator Author

Nice cleanup. Did you test with a small number in a uin64 for instance? That's how I encountered the issue.

I'm pretty sure a small number should still work, I just tested it using a system_test and it seemed to pass.

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.

MavlinkDirect API doesn't seem to support uint64_t fields when they have large number

2 participants