Skip to content

Commit 8e2d14f

Browse files
authored
Fix typo in README (parameter name didn't match usage in function) (#167)
1 parent fbc5b93 commit 8e2d14f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub.publish({ data: "hi" });
3838
```
3939
## Services
4040
```
41-
const service = nh.advertiseService('/add_two_ints', 'beginner_tutorials/AddTwoInts', (req, resp) => {
41+
const service = nh.advertiseService('/add_two_ints', 'beginner_tutorials/AddTwoInts', (req, res) => {
4242
res.sum = req.a + req.b;
4343
return true;
4444
});
@@ -100,7 +100,7 @@ const sub = nh.subscribe('/chatter', StringMsg, (msg) => { ... });
100100
const pub = nh.advertise('/chatter', StringMsg);
101101
102102
const AddTwoInts = rosnodejs.require('beginner_tutorials').srv.AddTwoInts;
103-
const service = nh.advertiseService('/add_two_ints', AddTwoInts, (req, resp) => { ... });
103+
const service = nh.advertiseService('/add_two_ints', AddTwoInts, (req, res) => { ... });
104104
const client = nh.serviceClient('/add_two_ints', AddTwoInts);
105105
```
106106
## Actions (Experimental)

0 commit comments

Comments
 (0)