diff --git a/camera_aravis2/src/camera_aravis_node_base.cpp b/camera_aravis2/src/camera_aravis_node_base.cpp index c3e3f5f..dd64f90 100644 --- a/camera_aravis2/src/camera_aravis_node_base.cpp +++ b/camera_aravis2/src/camera_aravis_node_base.cpp @@ -405,6 +405,9 @@ bool CameraAravisNodeBase::setBoundedFeatureValue(const std::string& feature_nam ASSERT_GERROR_MSG(err, logger_, "In setting value for feature '" + feature_name + "'.", is_successful); + if (!is_successful) + return false; + T boundedValue = std::max(*min, std::min(value, *max)); return setFeatureValue(feature_name, boundedValue); diff --git a/camera_aravis2/src/camera_driver.cpp b/camera_aravis2/src/camera_driver.cpp index a193ec9..ba7415e 100644 --- a/camera_aravis2/src/camera_driver.cpp +++ b/camera_aravis2/src/camera_driver.cpp @@ -1195,7 +1195,7 @@ void CameraDriver::setupDynamicParameters() arv_device_get_float_feature_increment( p_device_, feature_name.c_str(), err.ref()); - if (fpRange.from_value != INT_MIN && fpRange.to_value != INT_MAX) + if (fpRange.from_value != DBL_MIN && fpRange.to_value != DBL_MAX) param_desc.floating_point_range = {fpRange}; //--- get current value as default and restrict it to 3 chars after @@ -1238,6 +1238,9 @@ void CameraDriver::setupDynamicParameters() arv_device_get_float_feature_increment( p_device_, feature_name.c_str(), err.ref()); + if (intRange.from_value != INT_MIN && intRange.to_value != INT_MAX) + param_desc.integer_range = {intRange}; + //--- get current value as default int defVal = 0; getFeatureValue(feature_name, defVal); @@ -2080,7 +2083,7 @@ void CameraDriver::printCameraConfiguration() const for (std::string warn_msg : config_warn_msgs_) { - RCLCPP_WARN(logger_, warn_msg.c_str()); + RCLCPP_WARN(logger_, "%s", warn_msg.c_str()); } }