You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some CAN packets from the SRR520 sensor (e.g., CRC_LIST) were being sent using classic CAN instead of CAN FD. The previous implementation only assumed CAN FD reception, causing these classic CAN packets to be missed.
Hexadecimal ID
Decimal ID
CAN FD
0x2bc
700
Yes
0x320
800
No
0x384
900
Yes
0x385
901
Yes
0x44c
1100
Yes
0x44d
1101
Yes
0x4b0
1200
Yes
0x4b1
1201
Yes
To resolve this issue, multi-threaded processing has been introduced to receive both classic CAN and CAN FD packets concurrently. Specifically, the architecture was changed to separate the threads for classic CAN and CAN FD reception, passing the received packets to a common processing thread via a thread-safe queue.
Tests performed
With this change, it has been confirmed that the classic CAN packet (ID: 0x320), which could not be received before, is now received correctly.
Effects on system behavior
The number of threads for packet reception processing has increased to three (one for classic CAN, one for CAN FD, and one for processing). A future reduction in the number of threads may need to be considered due to the potential impact on overall system performance.
Interface changes
Not applicable.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.52%. Comparing base (998b685) to head (cfac068). ⚠️ Report is 4 commits behind head on main.
@Ayrton2718 Thank you for the contribution! I'll try and find a sensor to test with next week. If you have a CANdump that I can test with offline, that would be super helpful and speed up things 🙇
@Ayrton2718 Thank you for the contribution! I'll try and find a sensor to test with next week. If you have a CANdump that I can test with offline, that would be super helpful and speed up things 🙇
@mojomex Sorry, I forgot to record the candump.
I can test it on the hardware again next week. I'll get the dump then and will mention you!
@Ayrton2718 Hi, thanks for taking the time to create this PR. Have you gotten the chance to record a Candump yet?
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
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.
Description
Some CAN packets from the SRR520 sensor (e.g.,
CRC_LIST) were being sent using classic CAN instead of CAN FD. The previous implementation only assumed CAN FD reception, causing these classic CAN packets to be missed.0x2bc0x3200x3840x3850x44c0x44d0x4b00x4b1To resolve this issue, multi-threaded processing has been introduced to receive both classic CAN and CAN FD packets concurrently. Specifically, the architecture was changed to separate the threads for classic CAN and CAN FD reception, passing the received packets to a common processing thread via a thread-safe queue.
Tests performed
With this change, it has been confirmed that the classic CAN packet (ID:
0x320), which could not be received before, is now received correctly.Effects on system behavior
The number of threads for packet reception processing has increased to three (one for classic CAN, one for CAN FD, and one for processing). A future reduction in the number of threads may need to be considered due to the potential impact on overall system performance.
Interface changes
Not applicable.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.