Skip to content

Commit

Permalink
Update first-app.md with default config on open
Browse files Browse the repository at this point in the history
Added `zenoh.Config()` to both z_sensor.py and z_subscriber.py to prevent zenoh.open() from throwing an error.
  • Loading branch information
mattvalentine authored Sep 20, 2024
1 parent 9382d72 commit 159422d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/docs/getting-started/first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def read_temp():
return random.randint(15, 30)

if __name__ == "__main__":
session = zenoh.open()
session = zenoh.open(zenoh.Config())
key = 'myhome/kitchen/temp'
pub = session.declare_publisher(key)
while True:
Expand All @@ -57,7 +57,7 @@ def listener(sample):
print(f"Received {sample.kind} ('{sample.key_expr}': '{sample.payload.deserialize(str)}')")

if __name__ == "__main__":
session = zenoh.open()
session = zenoh.open(zenoh.Config())
sub = session.declare_subscriber('myhome/kitchen/temp', listener)
time.sleep(60)
```
Expand Down

0 comments on commit 159422d

Please sign in to comment.