Repository navigation
bus_monitor: fix the blank line after 8-byte payloads in the data columns - #145
Merged
joshanne merged 1 commit intoOct 23, 2026
Merged
Conversation
…umns The Data Hex and Data ASCII columns show 8 bytes per line, but computed the number of lines as data_len / 8 + 1, which gives one line too many when the length is a multiple of 8. Every full classic CAN frame was therefore shown with an empty second line, doubling the height of its row, and CAN FD frames of 16, 24, ... 64 bytes got an empty last line. The number of lines is now the number of 8-byte groups, rounded up, and at least one, so that empty frames still get a line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Just a nice cleanup the clanker found while adding other things. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The bus monitor's Data Hex and Data ASCII columns show 8 bytes per line, but computed the number of lines as
data_len / 8 + 1, one too many whenever the length is a multiple of 8. Every full classic CAN frame got an empty second line, doubling the height of its row.Evidence
The same DroneCAN traffic in the bus monitor:
NodeStatus,actuator.Status,GetNodeInfoandLogMessageframes, then CAN FD frames of 12, 16 and 64 bytes.Before (master): each 8-byte frame has an empty line under its data, so only part of the traffic fits.
![Bus monitor before the fix]
After (this PR): one line per 8 bytes.
![Bus monitor after the fix]

Row heights of those 11 rows, in pixels:
Merge Danger
Door: two-way
Revert the commit to bring the empty line back.
Blast Radius: bus-monitor
Display only: the text of the two data columns of the bus monitor. Decoding a selected transfer reads the hex text back, and splitting it on whitespace gives the same bytes with or without the empty line.
🤖 Generated with Claude Code