-
Notifications
You must be signed in to change notification settings - Fork 2
Update to reflect new GpsTime changes. #56
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
Conversation
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.
🎉
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 { |
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.
You can unpack the tuple in the for loop too if you want
for message_and_time in messages { | |
for (message, gps_time) in messages { |
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.
Done.
/// | ||
/// # Parameters | ||
/// - `gps_time`: The GpsTime corresponding to a message. | ||
pub fn realtime_delay<T>(&mut self, gps_time: Option<Result<GpsTime, 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 think you can replace this generic param with sbp::time::GpsTimeError
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>>) { |
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.
Hmm maybe not actually, looks like it breaks some of the tests
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.
Yeah I think I may be stuck with the generic?
pub fn process_messages<S: MessageSender, T>( | ||
messages: impl Iterator<Item = (SBP, Option<std::result::Result<GpsTime, 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.
Same with this one
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>>)>, |
6171b0a
to
89603d7
Compare
Uprevved libsbp dependency to reflect new GpsTime changes.