mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
fix(console): correct trace output format
Format: 12.50 > [5e]12.25 > [d1]-8.25 > [e7]-3.00 (SNR first, then each hop shows [hash]SNR) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -393,12 +393,12 @@ def _execute_console_command(args: list) -> str:
|
||||
result = device_manager.send_trace(path)
|
||||
if result.get('success'):
|
||||
data = result['data']
|
||||
# Format like meshcore-cli: snr [hash] > snr [hash] > ... snr
|
||||
# Format: snr > [hash]snr > [hash]snr > ... > [hash]snr
|
||||
parts = []
|
||||
for t in data.get('path', []):
|
||||
snr = f"{t['snr']:.2f}"
|
||||
h = f"[{t['hash']}]" if 'hash' in t else ''
|
||||
parts.append(f"{snr} {h}")
|
||||
parts.append(f"{h}{snr}")
|
||||
return " > ".join(parts) if parts else "(empty trace)"
|
||||
return f"Error: {result.get('error')}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user