Skip to content

Commit

Permalink
Replace the deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzhar committed Feb 15, 2022
1 parent 6cd5aff commit c9fba52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ class ZedCamera : public rclcpp::Node
// <---- Parameter variables

// ----> Dynamic params
OnSetParametersCallbackHandle::SharedPtr mParamChangeCallbackHandle;

double mPubFrameRate = 15;
double mImgDownsampleFactor = 1.0;
int mCamBrightness = 4;
Expand Down
6 changes: 4 additions & 2 deletions zed_components/src/zed_camera/src/zed_camera_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ void ZedCamera::initParameters()
getOdParams();

// Dynamic parameters callback
set_on_parameters_set_callback(
std::bind(&ZedCamera::callback_paramChange, this, _1));
//set_on_parameters_set_callback(std::bind(&ZedCamera::callback_paramChange, this, _1)); // deprecated
mParamChangeCallbackHandle = add_on_set_parameters_callback(std::bind(&ZedCamera::callback_paramChange, this, _1));
}

void ZedCamera::getDebugParams()
Expand Down Expand Up @@ -1252,6 +1252,8 @@ void ZedCamera::getOdParams()
rcl_interfaces::msg::SetParametersResult
ZedCamera::callback_paramChange(std::vector<rclcpp::Parameter> parameters)
{
RCLCPP_INFO(get_logger(), "Parameter change callback");

rcl_interfaces::msg::SetParametersResult result;
result.successful = false;

Expand Down

0 comments on commit c9fba52

Please sign in to comment.