mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
colors in traces
This commit is contained in:
parent
5b80767228
commit
394324268e
1 changed files with 8 additions and 1 deletions
|
|
@ -1720,7 +1720,14 @@ async def next_cmd(mc, cmds, json_output=False):
|
||||||
print("Self]",end="")
|
print("Self]",end="")
|
||||||
for t in ev.payload["path"]:
|
for t in ev.payload["path"]:
|
||||||
print("→",end="")
|
print("→",end="")
|
||||||
print(f"{t['snr']:.2f}",end="")
|
snr = t['snr']
|
||||||
|
if snr >= 10 :
|
||||||
|
print(ANSI_GREEN, end="")
|
||||||
|
elif snr <= 0:
|
||||||
|
print(ANSI_RED, end="")
|
||||||
|
print(f"{snr:.2f}",end="")
|
||||||
|
if snr >= 10 or snr <= 0:
|
||||||
|
print(ANSI_END, end="")
|
||||||
print("→",end="")
|
print("→",end="")
|
||||||
if "hash" in t:
|
if "hash" in t:
|
||||||
print(f"[{t['hash']}]",end="")
|
print(f"[{t['hash']}]",end="")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue