Skip to content

feat(srr520): support classic can for CRC_LIST#358

Open
Ayrton2718 wants to merge 2 commits intotier4:mainfrom
Ayrton2718:fix/srr520-support-classic-can
Open

feat(srr520): support classic can for CRC_LIST#358
Ayrton2718 wants to merge 2 commits intotier4:mainfrom
Ayrton2718:fix/srr520-support-classic-can

Conversation

@Ayrton2718
Copy link

@Ayrton2718 Ayrton2718 commented Sep 22, 2025

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.

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.

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.

  • There are no open discussions or they are tracked via tickets.

@Ayrton2718 Ayrton2718 changed the title feat(srr520): implement multi-threaded CAN and CAN FD packet processing feat(srr520): support classic can Sep 22, 2025
@Ayrton2718 Ayrton2718 changed the title feat(srr520): support classic can feat(srr520): support classic can for CRC_LIST Sep 22, 2025
@codecov
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

❌ 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.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #358      +/-   ##
==========================================
- Coverage   34.06%   32.52%   -1.55%     
==========================================
  Files         126      126              
  Lines       10614    10549      -65     
  Branches     5481     4524     -957     
==========================================
- Hits         3616     3431     -185     
- Misses       6342     6519     +177     
+ Partials      656      599      -57     
Flag Coverage Δ
differential 32.52% <0.00%> (?)
total ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Common 46.02% <ø> (-7.89%) ⬇️
Hesai 29.80% <ø> (-1.78%) ⬇️
Velodyne 40.09% <ø> (-0.05%) ⬇️
Continental 31.50% <0.00%> (-0.60%) ⬇️
Robosense 5.64% <ø> (-0.10%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Ayrton2718 Ayrton2718 marked this pull request as ready for review September 24, 2025 02:15
@mojomex
Copy link
Collaborator

mojomex commented Sep 25, 2025

@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
Copy link
Author

Ayrton2718 commented Sep 29, 2025

@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!

@mojomex
Copy link
Collaborator

mojomex commented Oct 30, 2025

@Ayrton2718 Hi, thanks for taking the time to create this PR. Have you gotten the chance to record a Candump yet?

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