Merge pull request #71 from mogenson/prefer-notify

Add prefer_notify option to gatt_client subscribe()
This commit is contained in:
Michael Mogenson
2022-11-13 19:53:09 -05:00
committed by GitHub
3 changed files with 62 additions and 34 deletions

View File

@@ -294,8 +294,8 @@ class Peer:
async def discover_attributes(self):
return await self.gatt_client.discover_attributes()
async def subscribe(self, characteristic, subscriber=None):
return await self.gatt_client.subscribe(characteristic, subscriber)
async def subscribe(self, characteristic, subscriber=None, prefer_notify=True):
return await self.gatt_client.subscribe(characteristic, subscriber, prefer_notify)
async def unsubscribe(self, characteristic, subscriber=None):
return await self.gatt_client.unsubscribe(characteristic, subscriber)