Добавить протокол DEIF, диагностику CAN и сохранение сессий

This commit is contained in:
2026-10-04 23:34:26 +03:00
parent 6c08eece61
commit 0e3d89e1ee
8 changed files with 321 additions and 47 deletions

View File

@@ -262,5 +262,7 @@ def hex_str(data: bytes) -> str:
def raw_frame_text(data: bytes) -> str:
"""Show the same raw bytes in hexadecimal and decimal on separate lines."""
return hex_str(data) + "\n" + " ".join(str(byte) for byte in data)
"""Align each HEX/DEC byte in a three-character monospace column."""
hexadecimal = " ".join(f"{byte:02X}".ljust(3) for byte in data).rstrip()
decimal = " ".join(str(byte).ljust(3) for byte in data).rstrip()
return hexadecimal + "\n" + decimal