mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
Change contract for commands to return full event
This commit is contained in:
parent
39ea3cb3f3
commit
6fbf15885d
17 changed files with 231 additions and 104 deletions
|
|
@ -45,7 +45,11 @@ async def main():
|
|||
print("Connected to MeshCore device")
|
||||
|
||||
# Get contacts
|
||||
contacts = await meshcore.commands.get_contacts()
|
||||
result = await meshcore.commands.get_contacts()
|
||||
if result.type == EventType.ERROR:
|
||||
print(f"Error fetching contacts: {result.payload}")
|
||||
return
|
||||
contacts = result.payload
|
||||
if contacts:
|
||||
print(f"\nFound {len(contacts)} contacts:")
|
||||
for name, contact in contacts.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue