mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
telemetry output
This commit is contained in:
parent
4f157eafc2
commit
b099a1968e
1 changed files with 10 additions and 0 deletions
|
|
@ -1114,6 +1114,16 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
logger.debug(res)
|
||||
if res.type == EventType.ERROR:
|
||||
print(f"Error while requesting telemetry")
|
||||
else:
|
||||
res = await mc.wait_for_event(EventType.TELEMETRY_RESPONSE)
|
||||
logger.debug(res)
|
||||
if res is None:
|
||||
if json_output :
|
||||
print(json.dumps({"error" : "Timeout waiting telemetry"}))
|
||||
else:
|
||||
print("Timeout waiting telemetry")
|
||||
else :
|
||||
print(json.dumps(res.payload, indent=4))
|
||||
|
||||
case "contacts" | "list" | "lc":
|
||||
res = await mc.commands.get_contacts()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue