Closed nospam2000 closed 2 years ago
I cannot confirm that in general. The "selected values" display depends on label borders. When they are not byte or nibble aligned there can be a mismatch actually. Your fix seems legit but I don't know whether it would have impact on any other (internal) behavior right now. @jopohl what do you think?
@andynoack
The "selected values" display depends on label borders.
That was not clear to me, but it makes sense and explains the behaviour.
When they are not byte or nibble aligned there can be a mismatch actually.
In my case a label starts at bit column 102, nibble alignment would be at 101.
Your fix seems legit but I don't know whether it would have impact on any other (internal) behavior right now.
When looking at the bits which don't have a label they are decoded wrong with my patch, so forget about my patch.
The "selected values" show the real value at the offset from the column regardless of any labels. The values in the grid use the labels and may shift the bit-stream for a label aligned interpretation.
Here an example where I disabled the labels for the first two packets. The raw data is the same for packets 1 to 7, but the matrix display gets adjusted according to the label:
The marked cells "C" + "E" are displayed as "72" like the values from packet 1 and 2. This is ok once the behaviour of labels is clear.
Expected Behavior
The displayed values of the "selected columns" for "Bit:", "Hex:" and "Decimal:" below the grid should be correct.
Actual Behavior
The start and end offsets of the bit-range are calculated incorrectly. For the Hex value that means the offset is shifted by 3 and the ASCII offset is shifted by 7.
Steps To Reproduce
Screenshots
Screenshot1: shows error
The selected cell contains the value '5' but below the grid the value 'f' is displayed:
Actually the bit offsets from 133 to 136 are used instead of 130 to 133.
Screenshot2: shows correct behaviour in "Bit" mode
In "Bit" mode the display is correct:
Platform Specifications
Possible fix
The calculation of 'start' and 'end' in CompareFrameController.py:on_table_selection_timer_timeout() is incorrect because the range of the column numbers starts from '1' but the multiplication needs to be done on a base of zero and then the '1' added afterwards.