From 92ed7f12eb6c10376a06ad82b649d9946a19ed8c Mon Sep 17 00:00:00 2001 From: Vishnuprasad Prachandabhanu Date: Fri, 3 Nov 2023 11:31:54 +0100 Subject: [PATCH] remove build warings --- .../node_canopen_base_driver_impl.hpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/canopen_base_driver/include/canopen_base_driver/node_interfaces/node_canopen_base_driver_impl.hpp b/canopen_base_driver/include/canopen_base_driver/node_interfaces/node_canopen_base_driver_impl.hpp index 5b73efed..74e2d03f 100644 --- a/canopen_base_driver/include/canopen_base_driver/node_interfaces/node_canopen_base_driver_impl.hpp +++ b/canopen_base_driver/include/canopen_base_driver/node_interfaces/node_canopen_base_driver_impl.hpp @@ -43,8 +43,9 @@ void NodeCanopenBaseDriver::configure(bool call catch (...) { } - RCLCPP_INFO( - this->node_->get_logger(), "Non transmit timeout %d", this->non_transmit_timeout_.count()); + RCLCPP_INFO_STREAM( + this->node_->get_logger(), + "Non transmit timeout" << static_cast(this->non_transmit_timeout_.count()) << "ms"); try { @@ -101,6 +102,18 @@ void NodeCanopenBaseDriver::configure(bool call template <> void NodeCanopenBaseDriver::configure(bool called_from_base) { + try + { + this->non_transmit_timeout_ = + std::chrono::milliseconds(this->config_["non_transmit_timeout"].as()); + } + catch (...) + { + } + RCLCPP_INFO_STREAM( + this->node_->get_logger(), + "Non transmit timeout" << static_cast(this->non_transmit_timeout_.count()) << "ms"); + try { polling_ = this->config_["polling"].as();