mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-15 05:36:53 +00:00
Refactor to event system
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
from meshcore import MeshCore
|
||||
from meshcore import BLEConnection
|
||||
|
||||
@@ -15,7 +14,7 @@ async def main () :
|
||||
mc = MeshCore(con)
|
||||
await mc.connect()
|
||||
|
||||
await mc.ensure_contacts()
|
||||
await mc.send_msg(bytes.fromhex(mc.contacts[DEST]["public_key"])[0:6],MSG)
|
||||
await mc.get_contacts()
|
||||
await mc.commands.send_msg(bytes.fromhex(mc.contacts[DEST]["public_key"])[0:6],MSG)
|
||||
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user