Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

@john-michaelburke john-michaelburke commented May 11, 2021

Uprevved libsbp dependency to reflect new GpsTime changes.

@john-michaelburke john-michaelburke marked this pull request as ready for review May 11, 2021 18:55
@john-michaelburke john-michaelburke requested review from jayvdb, notoriaga and silverjam and removed request for silverjam May 11, 2021 18:55
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.

🎉

let mut main = MainTab::new(shared_state.clone(), client_send);
let messages = strip_errors_iter(true, messages);
for message in messages {
for message_and_time in messages {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can unpack the tuple in the for loop too if you want

Suggested change
for message_and_time in messages {
for (message, gps_time) in messages {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

///
/// # Parameters
/// - `gps_time`: The GpsTime corresponding to a message.
pub fn realtime_delay<T>(&mut self, gps_time: Option<Result<GpsTime, T>>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can replace this generic param with sbp::time::GpsTimeError

Suggested change
pub fn realtime_delay<T>(&mut self, gps_time: Option<Result<GpsTime, T>>) {
pub fn realtime_delay(&mut self, gps_time: Option<Result<GpsTime, GpsTimeError>>) {

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm maybe not actually, looks like it breaks some of the tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I think I may be stuck with the generic?

Comment on lines +13 to +14
pub fn process_messages<S: MessageSender, T>(
messages: impl Iterator<Item = (SBP, Option<std::result::Result<GpsTime, T>>)>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with this one

Suggested change
pub fn process_messages<S: MessageSender, T>(
messages: impl Iterator<Item = (SBP, Option<std::result::Result<GpsTime, T>>)>,
pub fn process_messages<S: MessageSender>(
messages: impl Iterator<Item = (SBP, Option<std::result::Result<GpsTime, GpsTimeError>>)>,

@john-michaelburke john-michaelburke merged commit 31f6ea8 into main May 11, 2021
@john-michaelburke john-michaelburke deleted the update_libsbp_dep branch May 11, 2021 21:05
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