Change contract for commands to return full event

This commit is contained in:
Alex Wolden 2025-04-14 11:10:59 -07:00
parent 39ea3cb3f3
commit 6fbf15885d
17 changed files with 231 additions and 104 deletions

View file

@ -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():