Skip to content

Commit

Permalink
Fix parameter change event (#310)
Browse files Browse the repository at this point in the history
Signed-off-by: acuadros95 <[email protected]>

Signed-off-by: acuadros95 <[email protected]>
  • Loading branch information
Acuadros95 authored Aug 23, 2022
1 parent 7a85616 commit 786d95e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rclc_parameter/src/rclc_parameter/parameter_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,13 +1300,13 @@ rclc_parameter_set_bool(
return RCLC_PARAMETER_MODIFICATION_REJECTED;
}

parameter->value.bool_value = value;

if (parameter_server->notify_changed_over_dds) {
rclc_parameter_prepare_changed_event(&parameter_server->event_list, parameter);
rclc_parameter_service_publish_event(parameter_server);
}

parameter->value.bool_value = value;

return RCL_RET_OK;
}

Expand Down Expand Up @@ -1345,13 +1345,13 @@ rclc_parameter_set_int(
return RCLC_PARAMETER_MODIFICATION_REJECTED;
}

parameter->value.integer_value = value;

if (parameter_server->notify_changed_over_dds) {
rclc_parameter_prepare_changed_event(&parameter_server->event_list, parameter);
rclc_parameter_service_publish_event(parameter_server);
}

parameter->value.integer_value = value;

return RCL_RET_OK;
}

Expand Down Expand Up @@ -1390,13 +1390,13 @@ rclc_parameter_set_double(
return RCLC_PARAMETER_MODIFICATION_REJECTED;
}

parameter->value.double_value = value;

if (parameter_server->notify_changed_over_dds) {
rclc_parameter_prepare_changed_event(&parameter_server->event_list, parameter);
rclc_parameter_service_publish_event(parameter_server);
}

parameter->value.double_value = value;

return RCL_RET_OK;
}

Expand Down

0 comments on commit 786d95e

Please sign in to comment.