Добавить протокол DEIF, диагностику CAN и сохранение сессий
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user