Skip to content

Commit

Permalink
Apply denis suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Dr. Denis <[email protected]>
  • Loading branch information
saikishor and destogl authored Oct 1, 2023
1 parent af1c9a6 commit 8cc0d71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2054,10 +2054,12 @@ controller_interface::return_type ControllerManager::update(
if (controller_go)
{
auto controller_ret =
loaded_controller.c->update(time, run_controller_at_cm_rate ? period : controller_period);
loaded_controller.c->update(time, controller_period);

if (*loaded_controller.next_update_cycle_time == rclcpp::Time(0))
{
*loaded_controller.next_update_cycle_time = time;
}
*loaded_controller.next_update_cycle_time += controller_period;

if (controller_ret != controller_interface::return_type::OK)
Expand Down

0 comments on commit 8cc0d71

Please sign in to comment.