Skip to content

Commit e4ea3bd

Browse files
authored
Small update to readme (#200)
- incorporating q&a from #199
1 parent e9bfcdc commit e4ea3bd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ const sub = nh.subscribe('/chatter', 'std_msgs/String', (msg) => {
2222
const pub = nh.advertise('/chatter', 'std_msgs/String');
2323
pub.publish({ data: "hi" });
2424
```
25+
26+
The `advertise` function takes an options object as optional third argument:
27+
```js
28+
{
29+
queueSize: 1,
30+
latching: false //
31+
throttleMs: 0
32+
}
33+
```
34+
If you plan to publish messages right after another in the same function, set `throttleMs: -1`. Otherwise only the last message will be sent.
35+
2536
### Udp transport (Experimental)
2637

2738
```js

0 commit comments

Comments
 (0)