[~] Refactor
This commit is contained in:
parent
f4680839c5
commit
1aadfb9b4b
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,3 +10,6 @@
|
|||||||
[submodule "deps/argrento-huami-token"]
|
[submodule "deps/argrento-huami-token"]
|
||||||
path = deps/argrento-huami-token
|
path = deps/argrento-huami-token
|
||||||
url = https://github.com/argrento/huami-token
|
url = https://github.com/argrento/huami-token
|
||||||
|
[submodule "deps/rbaron-m6-reveng"]
|
||||||
|
path = deps/rbaron-m6-reveng
|
||||||
|
url = https://github.com/rbaron/m6-reveng
|
||||||
|
1
deps/rbaron-m6-reveng
vendored
Submodule
1
deps/rbaron-m6-reveng
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 08bd1fe346ef402294a371dd565b6a6d3c52b96f
|
@ -73,6 +73,7 @@ async def f5(
|
|||||||
async def f4(
|
async def f4(
|
||||||
timeout=None,
|
timeout=None,
|
||||||
characteristics=None,
|
characteristics=None,
|
||||||
|
operations=None,
|
||||||
name_check=None,
|
name_check=None,
|
||||||
):
|
):
|
||||||
if isinstance(name_check, str):
|
if isinstance(name_check, str):
|
||||||
@ -104,15 +105,21 @@ async def f4(
|
|||||||
t4 = await f3(t3)
|
t4 = await f3(t3)
|
||||||
pprint.pprint(t4)
|
pprint.pprint(t4)
|
||||||
|
|
||||||
t6 = {}
|
if not operations is None and inspect.isfunction(operations):
|
||||||
for o in characteristics:
|
await operations(
|
||||||
try:
|
client=t3,
|
||||||
t7 = await t3.read_gatt_char(o)
|
t4=t4,
|
||||||
except Exception as exception:
|
)
|
||||||
print(traceback.format_exc())
|
else:
|
||||||
t7 = None
|
t6 = {}
|
||||||
t6[o] = t7
|
for o in characteristics:
|
||||||
pprint.pprint(t6)
|
try:
|
||||||
|
t7 = await t3.read_gatt_char(o)
|
||||||
|
except Exception as exception:
|
||||||
|
print(traceback.format_exc())
|
||||||
|
t7 = None
|
||||||
|
t6[o] = t7
|
||||||
|
pprint.pprint(t6)
|
||||||
finally:
|
finally:
|
||||||
if not t3 is None:
|
if not t3 is None:
|
||||||
await t3.disconnect()
|
await t3.disconnect()
|
||||||
|
Loading…
Reference in New Issue
Block a user