Skip to content

Commit

Permalink
Added adapter.start and adapter.stop in list_muses (#52)
Browse files Browse the repository at this point in the history
👍
  • Loading branch information
jdpigeon authored Jun 19, 2018
1 parent 6f18b3f commit 9e1e7f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions muselsl/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ def list_muses(backend='auto', interface=None):
else:
adapter = pygatt.BGAPIBackend(serial_port=interface)

adapter.start()
print('Searching for Muses, this may take up to 10 seconds...')
devices = adapter.scan(timeout=MUSE_SCAN_TIMEOUT)
adapter.stop()
muses = []

for device in devices:
Expand Down

0 comments on commit 9e1e7f0

Please sign in to comment.