Skip to content

Commit eb88566

Browse files
committed
Fix example errors (#1205)
This PR fixes timing and property access errors in example code. The changes correct a timer interval misconfiguration and fix incorrect property access in action client feedback handling. - Fixed timer interval from 1 millisecond to 1 second (1 billion nanoseconds) - Corrected feedback message property access by removing redundant `.feedback` accessor Fix: #1204
1 parent b51f6a8 commit eb88566

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example/actions/action_client/action-client-cancel-example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class FibonacciActionClient {
5757
feedbackCallback(feedbackMessage) {
5858
this._node
5959
.getLogger()
60-
.info(`Received feedback: ${feedbackMessage.feedback.sequence}`);
60+
.info(`Received feedback: ${feedbackMessage.sequence}`);
6161
}
6262

6363
async timerCallback(goalHandle) {

example/timer/timer-example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rclnodejs
2121
.then(() => {
2222
let node = rclnodejs.createNode('timer_example_node');
2323

24-
let timer = node.createTimer(BigInt(1000000), () => {
24+
let timer = node.createTimer(BigInt(1000000000), () => {
2525
console.log('One second escaped!');
2626

2727
console.log('Cancel this timer.');

0 commit comments

Comments
 (0)