-
Notifications
You must be signed in to change notification settings - Fork 79
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
(Bug) Deser function in MavFrame/MavHeader not working properly #205
Comments
Merged and available on latest release: https://github.com/mavlink/rust-mavlink/releases/tag/0.12.1 |
hey @patrickelectric thank you for releasing this fast. But this issue, while related to PR #204, is not the same. That PR fixes another related problem (I didn't bother creating an issue for it, because it was straightforward). |
Hi @IhsenBouallegue, sorry for closing the issue early. It's a weird problem, to be sure, what kind of hardware is sending this messages ? is it x86 ? is it ARM ? It's probably not an issue with the LoRa link, but it's the first time that I'm seeing such problem. |
And how the companion part is running ? Is it using rust-mavlink as well ? |
@patrickelectric I threw together a reproduction repo (no lora, just ser and then deser, and still getting the same output)
(On a good note, the issue with the sequence is fixed 😄) |
Thanks for creating your repository @IhsenBouallegue. It should be fixed by #206 now, I just used in your repository and it indeed solves the problem. I'll add your example as a test. |
Hey @patrickelectric, most welcome! Glad to see it fixed. |
Soon after merging a second test, I'll update you. |
@IhsenBouallegue tag done, should be available soon. |
@patrickelectric Yup it works! Can't thank you enough :D You literally saved my thesis 😆 You, my friend, will be going into the acknowledgements 🏆 |
wow, Thank you 😆 |
While using rust mavlink to serialize MavFrames and send them over a LoRa link, I noticed some weird inconsistencies.
I noticed a weird problem. Not sure if I am the only one having it.
Here are my findings, if you can point me I will be happy to fix it and open a PR.
All the values inside the MavMessage are wrong. But not random! so it's not a problem with the LoRa link. I also printed the buffers out and confirmed that they are identical. The problem happens when deserialising.
I noticed something peculiar
20 is 0000000000010100 while 5120 is 0001010000000000
1792 is 0000011100000000 while 0000000000000111
It is consistent. At first, I suspected it has something to do with big/little endian. But maybe the bits don't quite align for that? Not sure what it can be, because I can't find the code responsible for serializing and deserializing the message anywhere in the repo. Is it being imported from somewhere?
I would appreciate any hint 😃
The text was updated successfully, but these errors were encountered: