Skip to content

Commit 31c3cb6

Browse files
szymon-czaprackisjanc
authored andcommitted
log: Add "|" symbol to identify header in raw data
Add | symbol between packet header and data for BTP command. This could prove useful, as user can see command data without counting bytes.
1 parent a2e23cf commit 31c3cb6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

autopts/pybtp/iutctl_common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def write_to_log(self, req, data, hex_data):
8282
f = self.log_file
8383
indent = ' ' * 18
8484

85+
hex_data = hex_data[:14] + "|" + hex_data[14 + 1:]
86+
8587
if len(hex_data) > 47:
8688
# This ensures clean text indentation for longer raw data, with 16 bytes per line
8789
hex_data = '\n' + indent + re.sub(r'(.{48})', r'\1\n' + indent, hex_data)

0 commit comments

Comments
 (0)