-
Notifications
You must be signed in to change notification settings - Fork 97
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
libsbp C headers and test stubs. #32
Conversation
#define SBP_MSG_OBS 0x0045 | ||
typedef struct __attribute__((packed)) { | ||
observation_header_t header; /**< Header of a GPS observation message */ | ||
packed_obs_content_t* obs; /**< Observations */ |
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.
This is incorrect because pointers and arrays are not really the same. You can do something similar to this but unfortunately in C you can only express a variable length array if it is the last element of the struct (google C99 flexible array member) :(
We should probably think hard about how to deal with these kinds of constructs.
Looks good, a few thoughts:
|
First pass at libsbp C headers for inclusion in libswiftnav and piksi_firmware. Will fix formatting issues later, but need comments for integration, etc. /cc @fnoble
In the rare instances we're using variable-length arrays, use a 0-length array. It seems we can't use the C99 flexible array declaration in the case where the flexible array is the only element in the struct.
An update:
|
Mark Twain |
libsbp C headers and test stubs.
First pass at libsbp C headers for inclusion in libswiftnav and
piksi_firmware. Will fix formatting issues later, but need comments
for integration, etc.
/cc @fnoble @gsmcmullin @mfine @cbeighley