-
Notifications
You must be signed in to change notification settings - Fork 31
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
Use own proc macro to generate code to deal with packets #7
Conversation
Don't spend too much effort on this part - I want to totally rewrite how the serial library parts work, so if anything gets sticky with that, feel free to just comment it out entirely. I'll look more at this later when I get a sec, but in general where the documentation and the code disagree I trust the documentation more. |
5c67522
to
5390375
Compare
Fixed issue with
I did almost that. |
13e4138
to
ed85046
Compare
Features: - removes unnecessary dependicies - more type safe code - faster parser: 3x fixes ublox-rs#1
Usefull for SPI, where we need provide read buffer simultaneously with write buffer
ed85046
to
0f45945
Compare
c5bcb2c
to
989eee9
Compare
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 haven't gotten to the derive crate yet, but looking good so far.
ad9911b
to
8938b27
Compare
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.
Just that one comment about collecting over results, and then this looks good to me. Thanks for all your hard work on this!
- Add size_fn to specify sizing of dynamic message when serializing packets. - Add serialization and code gen for iterators and structs Co-authored-by: Steven Meyer <smeyer@fastmail.com> Co-authored-by: Jason Mobarak <jason@swift-nav.com>
Features:
fixes separate protocol and implementation? #1
@lkolbly
Problems I found during conversation to usage of proc macro that I would like to disscuss:
NavPosVelTime
before:
after:
the last version is match documentation, while previous one not,
not sure how this works before
NavPosVelTime
uses mm/s as speed units whileNavVelNed
uses cm/saccording to documentation, but previous code for some reason treats
NavVelNed
as mm instead of cm, is it problem with documentation or with code?
And side note
NavStatus
have similar fields withNavPosVelTime
, but only one bit representation match according to documentation, all other fields has different format, though the same name and the same purpose.Why negative nanoseconds values converted to 0, may be negative also valid value, or why they use signed integer instead of unsigned one?
May be use chrono function to validate date instead of convert it without check?
What missed:
because of how you plan to use AlpSrv is not clear for me,
and looks like AlpSrv is removed in u-blox8 (https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_(UBX-13003221)_Public.pdf)
But I convert what I can, and you can see how code improved, at now you don't need to use magic numbers for class/message id.
And comment from previous review:
This is against idea that
Builder
is just the way to create packet, so you can not serialize builder, there is no sense in this operation, but you can create packet from builder. That's why I don't call it serialization.