fixed timeout issue for big sdo block transfers#36
Merged
wilkinsw merged 2 commits intoDaxbot:mainfrom Aug 9, 2022
Merged
Conversation
Member
|
Looks good, thanks for adding that! |
Member
|
Included in version 5.0.7 |
Member
|
I opened a new issue #37 to go back and take a look at multiple block transfers |
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.
Hello,
first of all, thank you for the code. I use it in a project, where we send a lot of small data.
At one point, we want to send big data (1MB) over the can. It works great, as long as there is nothing else on the network.
If there are other packages, the sdo block transfer will just stop and don't tell anything.
I figured out a way around this issue. The SDO block transfer is just trying to send as much as possible, even though the can connection is to full. But luckly the socketcan package helps us out of this.
Thats why we want the return value of the send method, it tells us if the message got transmitted succesfully.
On the other hand, I update the interval timeout, to give the can some time to recover after it filled up. For now this code seems to work fine, but It could run into issues if you have multiple sdo block transfers. What could happen then, is, it will give the Can channel more time to recover, because two messages try to send at the same time.
I was not sure what a good way is to track the download, so I did it in one variable. This can result in slower download when running multiple block transfers.
Let me know what you think about this and Cheers