-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add some remaining M10SPG suggestions #48
Conversation
src/collectors/m10spg_clctr.c
Outdated
uint32_t U32; /**< The message payload, interpreted as a uin32_t */ | ||
int32_t I32; /**< The message payload, interpreted as a int32_t */ | ||
uint8_t U8; /**< The message payload, interpreted as a uint8_t */ | ||
vec2d_t VEC2D; /**< The message payload, interpreted as a vec2d_t */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should mention that even with the packed
attribute, I've found that the float members within vec2d_t
and float
get padded. For those measurements you will unfortunately have to use the uint8_t
buffer with some pointer casting. I'm not sure if adding packed
to the union would help, but you could try and see if packager can still receive the data properly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a common type for fetcher, I'll start on adding it to packager. Then we can see if it'll work or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but triple check about padding issues with the floats.
233c752
to
b43d727
Compare
Since the underlying data is encoded as ints, simply copying into memory interpreted as floats will cause corruption of data
b43d727
to
481b3e7
Compare
A temporary measure to ensure no floating point math is preventing gps data from getting through
41fdcf6
to
85097b3
Compare
93cd708
to
95534fb
Compare
Fixed leftover suggestions from #22 that I think were missed, as well as fixed the casting of values from ints to floats which should make the GPS data more understandable