Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and rework canbusload #556

Merged
merged 5 commits into from
Aug 9, 2024
Merged

Fix and rework canbusload #556

merged 5 commits into from
Aug 9, 2024

Conversation

hartkopp
Copy link
Member

@hartkopp hartkopp commented Aug 8, 2024

  • rework to use a single CAN socket for the received CAN traffic.
    This allows to shutdown and restart various CAN interfaces without
    terminating the application.
    Additionally an auto detection has been implemented with the 'any' CAN
    interface. E.g. with any@500000,2000000 CAN interfaces that have not
    been defined before are assigned with the given 'any' bitrates when a
    CAN frame from this CAN interface has been received.

  • show RX/TX direction in bargraph

  • fix and improve the bitrate output

The CAN interface description can now have two bitrates.
Extend the length check to handle the CAN FD data bitrate correctly.

Fixes: 6382765 ("canbusload: count databitrate seperately")
Signed-off-by: Oliver Hartkopp <[email protected]>
Rework to use a single CAN socket for the received CAN traffic.
This allows to shutdown and restart various CAN interfaces without
terminating the application.
Additionally an auto detection has been implemented with the 'any' CAN
interface. E.g. with any@500000,2000000 CAN interfaces that have not
been defined before are assigned with the given 'any' bitrates when a
CAN frame from this CAN interface has been received.

Signed-off-by: Oliver Hartkopp <[email protected]>
To access msg_flags for RX/TX direction detection.

Signed-off-by: Oliver Hartkopp <[email protected]>
With the introduction of CAN FD the bitrate has not been printed
correcty. Fix the CAN FD bitrate output and try to shrink the
bitrates by using kilo or Mega suffixes: 500000 -> 500k

Fixes: 6382765 ("canbusload: count databitrate seperately")
Signed-off-by: Oliver Hartkopp <[email protected]>
Copy link
Member

@marckleinebudde marckleinebudde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just scrolled over the changes....

canbusload.c Show resolved Hide resolved
@hartkopp hartkopp merged commit 6526683 into linux-can:master Aug 9, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants