Skip to content

Commit 30416ba

Browse files
idesign0saikishor
andauthored
Use fmt for correct int64_t format specifier across platforms (#2817)
--------- Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com> Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com> Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
1 parent 432ecad commit 30416ba

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

controller_interface/src/controller_interface_base.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ const rclcpp_lifecycle::State & ControllerInterfaceBase::configure()
165165
if (ctrl_itf_params_.update_rate != 0u && update_rate > ctrl_itf_params_.update_rate)
166166
{
167167
RCLCPP_WARN(
168-
get_node()->get_logger(),
169-
"The update rate of the controller : '%ld Hz' cannot be higher than the update rate of the "
170-
"controller manager : '%d Hz'. Setting it to the update rate of the controller manager.",
171-
update_rate, ctrl_itf_params_.update_rate);
168+
get_node()->get_logger(), "%s",
169+
fmt::format(
170+
"The update rate of the controller : '{} Hz' cannot be higher than the update rate of "
171+
"the "
172+
"controller manager : '{} Hz'. Setting it to the update rate of the controller manager.",
173+
update_rate, ctrl_itf_params_.update_rate)
174+
.c_str());
172175
}
173176
else
174177
{

0 commit comments

Comments
 (0)