From 055810e8a9e234867223eb63f6280461f919f003 Mon Sep 17 00:00:00 2001 From: Rob9315 Date: Thu, 22 Jun 2023 09:28:34 +0200 Subject: [PATCH] rosrust::Time as TimeMsg if rosrust_msg is active (#6) --- src/ros_types.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ros_types.rs b/src/ros_types.rs index 8f8ade1..f25c698 100644 --- a/src/ros_types.rs +++ b/src/ros_types.rs @@ -1,15 +1,20 @@ +#[cfg(not(feature = "rosrust_msg"))] #[derive(Clone, Debug)] pub struct TimeMsg { pub sec: u32, pub nsec: u32, } +#[cfg(not(feature = "rosrust_msg"))] impl Default for TimeMsg { fn default() -> Self { Self { sec: 0, nsec: 0 } } } +#[cfg(feature = "rosrust_msg")] +pub use rosrust::Time as TimeMsg; + #[derive(Clone, Debug)] pub struct HeaderMsg { pub seq: u32,