-
Notifications
You must be signed in to change notification settings - Fork 113
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
Rumble protocol throttling and concurrency fixups #204
Merged
Conversation
This file contains 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
kakra
added
1 | state: testing solution
Solution is in testing phase
0 | type: third party bug
labels
Jun 20, 2020
kakra
force-pushed
the
tests/throttle-rumble-protocol
branch
from
June 20, 2020 23:53
cd916f0
to
2f0972b
Compare
Signed-off-by: Kai Krakow <[email protected]>
Signed-off-by: Kai Krakow <[email protected]>
Signed-off-by: Kai Krakow <[email protected]>
Otherwise we may give user space an inconsistent view of the battery and power supply status. Signed-off-by: Kai Krakow <[email protected]>
Otherwise we may work on a partially updated structure and that may leave the rumble motors running without letting the driver know it. Signed-off-by: Kai Krakow <[email protected]>
kakra
force-pushed
the
tests/throttle-rumble-protocol
branch
2 times, most recently
from
June 27, 2020 12:00
f180750
to
9f0c15f
Compare
Thanks to @medusalix great findings that the controller crashes are most probably indeed a timing issue, this commit introduces a modified rumble protocol which throttles rumble commands sent to the controller. Also, it seems we cannot rely on `ff-memless` to only send us commands once per 50ms although that's the proposed time resolution of the protocol. It may depend on kernel HZ setting. This commit migrates the rumble worker into a delayed worker. When programming a rumble motor, we now remember the timing and allow the next reprogramming only 10ms+ in the future. Further requests will be buffered and the final command will be replayed to the controller when the delayed worker finally runs. Care was taken that we do not accidentally introduce a fixed lag of 10ms for rumble events. Maybe-fixes: atar-axis#180 Fixes: atar-axis#189 Signed-off-by: Kai Krakow <[email protected]>
kakra
force-pushed
the
tests/throttle-rumble-protocol
branch
from
June 27, 2020 12:06
9f0c15f
to
5b8ffcf
Compare
Code Climate has analyzed commit 5b8ffcf and detected 0 issues on this pull request. View more on Code Climate. |
Tested for multiple hours without problems. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Please test.