python-can-monitor
python-can-monitor copied to clipboard
Hex ID overlaps the Decimal ID
My Chevy Colorado gives ID's that are 9 digits long in decimal. The ID's are being overlapped and so it looks like it's giving the wrong ID at first. You might want to add some extra padding to the addstr() functions in the x parameter and also increase the column_width above 50. Here was my solution. Change these lines of code in canmonitor.py:
- line 106 - column_width = 100
- line 119 - win.addstr(1, 25 + bytes_column_start + i * column_width, 'Bytes')
- line 120 - win.addstr(1, 30 + text_column_start + i * column_width, 'Text')
- line 138 - win.addstr(row, id_column_start + 18 + current_column * column_width, '%X'.ljust(5) % frame_id)
- line 141 - win.addstr(row, 25 + bytes_column_start + current_column * column_width, msg_bytes.ljust(28))
- line 144 - win.addstr(row, 30 + text_column_start + current_column * column_width, msg_str.ljust(8))