Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
imsudiproy committed Dec 23, 2024
1 parent 1ec9b01 commit 9047a35
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controller_manager/src/ros2_control_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ int main(int argc, char ** argv)

const bool has_realtime = realtime_tools::has_realtime_kernel();
const bool lock_memory = cm->get_parameter_or<bool>("lock_memory", has_realtime);
if (lock_memory)
if (lock_memory)
{
const auto lock_result = realtime_tools::lock_memory();
if (!lock_result.first) {
if (!lock_result.first)
{
RCLCPP_WARN(cm->get_logger(), "Unable to lock the memory: '%s'", lock_result.second.c_str());
}
}
Expand Down
18 changes: 18 additions & 0 deletions diff.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp
index f2079f80..75a98d19 100644
--- a/controller_manager/src/ros2_control_node.cpp
+++ b/controller_manager/src/ros2_control_node.cpp
@@ -61,10 +61,11 @@ int main(int argc, char ** argv)

const bool has_realtime = realtime_tools::has_realtime_kernel();
const bool lock_memory = cm->get_parameter_or<bool>("lock_memory", has_realtime);
- if (lock_memory)
+ if (lock_memory)
{
const auto lock_result = realtime_tools::lock_memory();
- if (!lock_result.first) {
+ if (!lock_result.first)
+ {
RCLCPP_WARN(cm->get_logger(), "Unable to lock the memory: '%s'", lock_result.second.c_str());
}
}

0 comments on commit 9047a35

Please sign in to comment.