Skip to content

Commit

Permalink
Minor cleanup, add dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
  • Loading branch information
luca-della-vedova committed Aug 2, 2023
1 parent f11b4b0 commit 90b0938
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions rclrs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<build_depend>rcl</build_depend>
<depend>builtin_interfaces</depend>
<depend>rcl_interfaces</depend>
<depend>rosgraph_msgs</depend>

<export>
<build_type>ament_cargo</build_type>
Expand Down
8 changes: 4 additions & 4 deletions rclrs/src/time_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ impl TimeSource {
for clock in self._clocks.lock().unwrap().iter() {
clock.set_ros_time(enable);
}
if enable {
self._clock_subscription = Some(self.create_clock_sub()?);
self._clock_subscription = if enable {
Some(self.create_clock_sub()?)
} else {
self._clock_subscription = None;
}
None
};
}
Ok(())
}
Expand Down

0 comments on commit 90b0938

Please sign in to comment.