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

Serde for Iterators, Added new messages #40

Merged
merged 68 commits into from
Oct 15, 2022
Merged

Conversation

adrian-kong
Copy link
Collaborator

@adrian-kong adrian-kong commented Sep 14, 2022

This PR adds some of missing messages (before recent merges) and code-gen for serde serialize implementations, helpful for serializing iterators.

List of new messages:

  • ESF_MEAS,
  • RXM_RAWX
  • RXM_SFRBX
  • ESF_RAW
  • ESF_INS
  • HNR_PVT
  • NAV_ATT
  • NAV_CLOCK
  • NAV_VELECEF
  • MGA_GPA_EPH

Serialization outputs includes the class id and message id*

adrian-kong and others added 12 commits August 26, 2022 13:08
Refactor DwrdIter, R4 doMes, RxmRawx bitflags
- 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>
@adrian-kong adrian-kong marked this pull request as ready for review September 14, 2022 02:47
@@ -21,7 +21,7 @@ jobs:
- name: Install MSRV
uses: actions-rs/toolchain@v1
with:
toolchain: 1.57.0
toolchain: 1.63.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey! Sorry for the delayed review.

Do we need 1.63 for this change, or can we get by with 1.57? I'm trying to keep the MSRV around a year old or so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so, can try reverting this. Besides that, is everything all good?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I just commented about the ublox_cli changes, but then yeah everything looks good. (it looks like there might be some merge conflicts, I haven't gotten a chance to look at them yet)

ublox_cli/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@silverjam silverjam left a comment

Choose a reason for hiding this comment

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

@lkolbly Can you please enable CI checks for this PR?

@@ -9,7 +9,7 @@ repository = "https://github.com/lkolbly/ublox"
readme = "../README.md"

[features]
default = ["std"]
default = ["std", "serde"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we disable serde by default?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think serde by default should be fine.

@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install libudev
run: sudo apt-get install -y libudev-dev
run: sudo apt-get update && sudo apt-get install -y libudev-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

We need a build variant that ensures that the library can build with serde enabled, correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We also need a matrix that tests we can build no_std and no alloc, for now I think we can survive with just testing the default case and we'll add that later.

@lkolbly
Copy link
Collaborator

lkolbly commented Sep 30, 2022

@silverjam I think CI is currently enabled for this PR?

(also, I should be able to merge this this weekend, hopefully)

@lkolbly
Copy link
Collaborator

lkolbly commented Sep 30, 2022

There are some merge conflicts though, maybe that's blocking CI.

@lkolbly
Copy link
Collaborator

lkolbly commented Oct 11, 2022

@silverjam Sorry for the delay, yeah apparently it wasn't enabled, not sure what was up with that. Anyway I enabled CI and it looks like we just need to use serde::{Serialize, Deserialize}

@silverjam
Copy link
Contributor

@lkolbly Ok, builds and tests are passing locally for me -- looks like you'll need to approve the CI one more time

@lkolbly lkolbly merged commit 5b34387 into ublox-rs:master Oct 15, 2022
@silverjam
Copy link
Contributor

Thanks for getting this in @lkolbly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants