adding files for the commit
This commit is contained in:
+14
-6
@@ -1,13 +1,21 @@
|
||||
from kano_wand.constants import *
|
||||
|
||||
async def start_notify(client, notification_handler):
|
||||
for char in CHARACTERISTIC_UUIDS.keys():
|
||||
await client.start_notify(char, notification_handler)
|
||||
async def start_notify(client, notification_handler, sensors):
|
||||
for char in sensors:
|
||||
await client.start_notify(CHARACTERISTIC_UUIDS[char], notification_handler)
|
||||
|
||||
|
||||
async def stop_notify(client):
|
||||
for char in CHARACTERISTIC_UUIDS.keys():
|
||||
await client.stop_notify(char)
|
||||
async def stop_notify(client, sensors):
|
||||
for char in sensors:
|
||||
await client.stop_notify(CHARACTERISTIC_UUIDS[char])
|
||||
|
||||
def chunker(seq, size):
|
||||
return (seq[pos:pos + size] for pos in range(0, len(seq), size))
|
||||
|
||||
|
||||
def get_key(val, dictionary):
|
||||
for key, value in dictionary.items():
|
||||
if val == value:
|
||||
return key
|
||||
|
||||
return "key doesn't exist"
|
||||
Reference in New Issue
Block a user