Skip to content

Commit 4d629ee

Browse files
Update ros-jazzy-hardware-interface.patch
1 parent ddf7432 commit 4d629ee

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

patch/ros-jazzy-hardware-interface.patch

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,3 @@ index 385ae96fb..e4883ff18 100644
2222
ament_target_dependencies(mock_components PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})
2323
# Causes the visibility macros to use dllexport rather than dllimport,
2424
# which is appropriate when building the dll but not consuming it.
25-
diff --git a/include/hardware_interface/async_components.hpp b/include/hardware_interface/async_components.hpp
26-
index 052c4ba92..85efed01f 100644
27-
--- a/include/hardware_interface/async_components.hpp
28-
+++ b/include/hardware_interface/async_components.hpp
29-
@@ -82,7 +82,11 @@ public:
30-
{
31-
auto const period = std::chrono::nanoseconds(1'000'000'000 / cm_update_rate_);
32-
TimePoint next_iteration_time =
33-
- TimePoint(std::chrono::nanoseconds(clock_interface_->get_clock()->now().nanoseconds()));
34-
+ TimePoint(std::chrono::system_clock::time_point(
35-
+ std::chrono::duration_cast<std::chrono::system_clock::duration>(
36-
+ std::chrono::nanoseconds(clock_interface_->get_clock()->now().nanoseconds())
37-
+ )
38-
+ ));
39-
40-
if (
41-
component->get_lifecycle_state().id() ==
42-
@@ -99,7 +103,7 @@ public:
43-
component->read(clock_interface_->get_clock()->now(), measured_period);
44-
first_iteration = false;
45-
}
46-
- next_iteration_time += period;
47-
+ next_iteration_time += std::chrono::duration_cast<decltype(next_iteration_time)::duration>(period);
48-
std::this_thread::sleep_until(next_iteration_time);
49-
}
50-
},

0 commit comments

Comments
 (0)