Skip to content

Commit

Permalink
Close Marty connections properly
Browse files Browse the repository at this point in the history
  • Loading branch information
brano2 committed Jan 11, 2022
1 parent 1114ffc commit 69c17e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions examples/example_dance.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@

# Ask Marty to dance
my_marty.dance()

# Disconnect from Marty
my_marty.close()
3 changes: 3 additions & 0 deletions examples/example_non_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
while my_marty.is_moving():
print(f"Marty's left leg is at {my_marty.get_joints()[0]['pos']}")
time.sleep(0.5)

# Disconnect from Marty
my_marty.close()
2 changes: 1 addition & 1 deletion examples/example_publish_and_report_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ def report_callback(report_info):
my_marty.walk(1)
time.sleep(10)

# Close
# Disconnect from Marty
my_marty.close()
3 changes: 3 additions & 0 deletions examples/example_sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@

# Ask Marty to play a sound
my_marty.play_sound("no_way")

# Disconnect from Marty
my_marty.close()

0 comments on commit 69c17e4

Please sign in to comment.