adding files for the commit

This commit is contained in:
Lucas Oskorep
2019-11-09 21:09:27 -06:00
parent 40c4e01f55
commit e91c870eca
71 changed files with 1923 additions and 56 deletions
+14 -6
View File
@@ -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"