python-can-monitor icon indicating copy to clipboard operation
python-can-monitor copied to clipboard

Hex ID overlaps the Decimal ID

Open kstahl48 opened this issue 3 years ago • 0 comments

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:

  1. line 106 - column_width = 100
  2. line 119 - win.addstr(1, 25 + bytes_column_start + i * column_width, 'Bytes')
  3. line 120 - win.addstr(1, 30 + text_column_start + i * column_width, 'Text')
  4. line 138 - win.addstr(row, id_column_start + 18 + current_column * column_width, '%X'.ljust(5) % frame_id)
  5. line 141 - win.addstr(row, 25 + bytes_column_start + current_column * column_width, msg_bytes.ljust(28))
  6. line 144 - win.addstr(row, 30 + text_column_start + current_column * column_width, msg_str.ljust(8))

kstahl48 avatar Mar 16 '21 08:03 kstahl48