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

AP_RCTelemetry: Fix Baro and Vario values #28478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Frank0587
Copy link

Add the missing byte swapping for 16bit values

@peterbarker
Copy link
Contributor

@andyp1per this is pretty recent code - has to be one or the other, how did you test the original code?

@andyp1per
Copy link
Collaborator

@andyp1per this is pretty recent code - has to be one or the other, how did you test the original code?

It requires the TX to specifically understand the encoding, so it was tested with great difficulty by others. I'm quite prepared to believe the encoding is still wrong, but would need to see evidence of success in order to approve

@Frank0587
Copy link
Author

I had used the original code on my plane and got always about -586,5m instead of 0 as altitude. As I calculate the values back to hex and look at the formula used at elrs and opentx, i found the wrong byteorder. Compare the code in AP between baro and vario against other telemetry values, i found the missing byte swapping. I test the new code on my plane, and the telemetry values looks now like expected.

@andyp1per
Copy link
Collaborator

@Frank0587 you need to squash your commits

Add the missing byte swapping for 16bit values
Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants