Open
Conversation
Removed timing and return value checks from read and write operations.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2926 +/- ##
==========================================
- Coverage 89.53% 89.51% -0.02%
==========================================
Files 156 156
Lines 18624 18624
Branches 1493 1493
==========================================
- Hits 16675 16672 -3
- Misses 1347 1349 +2
- Partials 602 603 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
|
This pull request is in conflict. Could you fix it @destogl? |
Contributor
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
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.
In the
async_handler_callbackfunction, I think we should first callwritethanread. The reason for this is that in that case we would at least have a chance of actually running the {read»update»write»sleep} cycle, where now it is basically always [update»read»write»sleep]. Exactly, it would probably be from HW perspective {write»read»sleep» (probably)update} (assuming the same frequency). Of course we don't know, but the chance that the values are updated betweenreadandwriteis very low. So in the current way, we are guaranteed to be at least one cycle behind; in the opposite case, we would have a chance to be more "in the cycle" with the most recent read data.Why is this important? When we think about "SLAVE" mode, then
readis usually blocking from the HW, so there we want to “sleep” and wait for the newest data and finish the execution of the loop. Hopefullyupdategets called, and then we canwritethe values. Nevertheless, I don't see we can do anything better, as we should not be slow and waiting forupdateas it might break the connection to the robot.