Skip to content

Commit

Permalink
minor changes and fix of compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
boitumeloruf committed Nov 28, 2024
1 parent ab19317 commit 30a0211
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions camera_aravis2/src/camera_aravis_node_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(feature_name, boundedValue);
Expand Down
7 changes: 5 additions & 2 deletions camera_aravis2/src/camera_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<int>(feature_name, defVal);
Expand Down Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 30a0211

Please sign in to comment.