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

CrcProtocol Support Crc8 #1724

Merged
merged 3 commits into from
Nov 28, 2024
Merged

CrcProtocol Support Crc8 #1724

merged 3 commits into from
Nov 28, 2024

Conversation

lorenzo-gomez-windhover
Copy link
Contributor

I'm currently integrating COSMOS with CFS draco rc5 and as you can see here for better or worse they're using an 8-bit checksum.

I tried my best to follow the unit testing patterns that are already in the code base.

After double checking the code I realized it is a simple checksum, not a CRC. But hopefully this still is a valuable addition since it just exposes functionality that was already there.

Question: In your opinion, will adding a custom protocol that calculates the checksum be the best approach to add the checksum to COSMOS?

I'm also trying to learn the system, so any advice will be greatly appreciated.

Hope these changes make sense.
Lorenzo

@jmthomas
Copy link
Member

@lorenzo-gomez-windhover This looks pretty good but we'll want to make the same changes on the Ruby side to keep parity in the languages. Can you update the PR to add Ruby support?

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.31%. Comparing base (f6c5692) to head (1cd9e7f).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1724      +/-   ##
==========================================
+ Coverage   76.30%   76.31%   +0.01%     
==========================================
  Files         603      603              
  Lines       46101    46113      +12     
  Branches      844      844              
==========================================
+ Hits        35177    35193      +16     
+ Misses      10827    10823       -4     
  Partials       97       97              
Flag Coverage Δ
frontend 56.39% <ø> (+0.24%) ⬆️
python 83.93% <ø> (-0.06%) ⬇️
ruby-api 48.70% <ø> (ø)
ruby-backend 82.18% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lorenzo-gomez-windhover
Copy link
Contributor Author

lorenzo-gomez-windhover commented Nov 22, 2024

Can you update the PR to add Ruby support?

Pushed new changes.
First time writing ruby so please let me know if I made any mistakes. I did run unit tests locally and they passed, but worth mentioning.

Copy link

sonarcloud bot commented Nov 22, 2024

@ryanmelt ryanmelt changed the title Python crc8 CrcProtocol Support Crc8 Nov 28, 2024
@ryanmelt ryanmelt merged commit 2966851 into OpenC3:main Nov 28, 2024
26 of 27 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.

3 participants