Expanded comments and simplified calculations on tx_device#105
Open
Expanded comments and simplified calculations on tx_device#105
Conversation
Collaborator
Toreil
commented
Jul 11, 2025
- Extra comments were added to try and make the communication between the various buffers and the card easier to understand.
- There were one or two instances of multiple variables being defined containing the same thing (memory addresses of the buffers) which has been removed.
- The calculation for the ring_buffer_position was very complicated but in the end a lot of the steps were unnecessary. In the original code it was creating a pointer to a slice of the ring buffer and then getting the memory location of that slice, in the new code it calculates that memory location directly from the location of the ring buffer and the memory offset of the slice.
Coverage Report
|
schote
requested changes
Jul 13, 2025
schote
reviewed
Jul 21, 2025
Owner
schote
left a comment
There was a problem hiding this comment.
The renaming makes sense, but I would like to avoid introducing abbreviations for the variable names and would generally keep them to a minimum. I.e. rather use data_buffer_address than data_buffer_addr. I think num_ is fine, but for channel we could also just use the long version. I think that saves us a large glossary and improves readability. What do you think @Toreil ?
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.