Implement HasTime for Frames
@@ -122,7 +122,7 @@ mod swiftnav_impl {
use crate::{
messages::SbpMessage,
time::{GpsTimeError, MessageTime, RoverTime},
- Sbp,
+ Frame, Sbp,
};
/// See [SbpIterExt::with_rover_time] for more information.
@@ -204,6 +204,12 @@ mod swiftnav_impl {
}
}
}
+
+ impl HasTime for Frame {
+ fn time(&self) -> Option<Result<MessageTime, GpsTimeError>> {
+ self.to_sbp().time()
+ }
+ }
}
#[cfg(test)]
