rosrust::Time as TimeMsg if rosrust_msg is active (#6)

This commit is contained in:
Rob9315 2023-06-22 09:28:34 +02:00 committed by GitHub
parent 4e8332a1d8
commit 055810e8a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1,15 +1,20 @@
#[cfg(not(feature = "rosrust_msg"))]
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct TimeMsg { pub struct TimeMsg {
pub sec: u32, pub sec: u32,
pub nsec: u32, pub nsec: u32,
} }
#[cfg(not(feature = "rosrust_msg"))]
impl Default for TimeMsg { impl Default for TimeMsg {
fn default() -> Self { fn default() -> Self {
Self { sec: 0, nsec: 0 } Self { sec: 0, nsec: 0 }
} }
} }
#[cfg(feature = "rosrust_msg")]
pub use rosrust::Time as TimeMsg;
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct HeaderMsg { pub struct HeaderMsg {
pub seq: u32, pub seq: u32,