Skip to content

Commit 19c1799

Browse files
authored
update spin call example to actual function def (#405)
From executor.h RCLC_PUBLIC rcl_ret_t rclc_executor_spin_some( rclc_executor_t * executor, const uint64_t timeout_ns); The examples given are missing the second non-optional parameter for timeout. I'm not sure what a good value would be so I opted to use 100ms from the examples.
1 parent 4726abb commit 19c1799

File tree

1 file changed

+5
-5
lines changed
  • _docs/concepts/client_library/execution_management

1 file changed

+5
-5
lines changed

_docs/concepts/client_library/execution_management/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,9 @@ rclc_executor_add_subscription(&exe_act, &act, &my_sub_cb4, ON_NEW_DATA);
429429

430430
// spin all executors
431431
while (true) {
432-
rclc_executor_spin_some(&exe_sense);
433-
rclc_executor_spin_some(&exe_plan);
434-
rclc_executor_spin_some(&exe_act);
432+
rclc_executor_spin_some(&exe_sense, RCL_MS_TO_NS(100));
433+
rclc_executor_spin_some(&exe_plan, RCL_MS_TO_NS(100));
434+
rclc_executor_spin_some(&exe_act, RCL_MS_TO_NS(100));
435435
}
436436
```
437437
@@ -455,8 +455,8 @@ rclc_executor_set_trigger(&exe_sense, rclc_executor_trigger_all, NULL);
455455
456456
// spin all executors
457457
while (true) {
458-
rclc_executor_spin_some(&exe_aggr);
459-
rclc_executor_spin_some(&exe_sense);
458+
rclc_executor_spin_some(&exe_aggr, RCL_MS_TO_NS(100));
459+
rclc_executor_spin_some(&exe_sense, RCL_MS_TO_NS(100));
460460
}
461461
```
462462

0 commit comments

Comments
 (0)