Skip to content

Commit

Permalink
btle.py: add getDevices() method to Scanner
Browse files Browse the repository at this point in the history
- this is useful when calling clear/start/process explicitly
  • Loading branch information
Ian Harvey committed Jan 9, 2016
1 parent ced4b7e commit e32798f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bluepy/btle.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,12 +623,15 @@ def process(self, timeout=10.0):
else:
raise BTLEException(BTLEException.INTERNAL_ERROR, "Unexpected response: " + respType)

def getDevices(self):
return self.scanned.values()

def scan(self, timeout=10):
self.clear()
self.start()
self.process(timeout)
self.stop()
return self.scanned.values()
return self.getDevices()


def capitaliseName(descr):
Expand Down

0 comments on commit e32798f

Please sign in to comment.