-
Notifications
You must be signed in to change notification settings - Fork 53
Allow uart to go ~100Hz versus 10Hz #50
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9820d4d
Allow uart to go ~100Hz versus 10Hz
evaherrada 8483415
Allow UART to go even faster with some janky recursion
evaherrada 7147de8
Formatted
evaherrada 0879db5
Changed time.time to time.monotonic
evaherrada 8434806
_read_register now uses loop in uart mode to increase stability and s…
evaherrada d73e432
Added break, reverted simpletest
evaherrada File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not recursion because recursion would call _read_register. Why did you add this? It wasn't needed before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial plan was to actually do that, but I couldn't think of a good way to add in an exit condition so it didn't just keep going until it reached the recursion limit, and I guess I forgot to remove the comment.
It's needed because the, when running in UART mode, even in the version that's currently on master, it raises a UART read error every 3 or 4 reads when you're trying to use the simpletest. I think that before it may have mostly been tested by getting a single value, such as acceleration, at a time. That being said, even though I know the majority of people aren't using this with UART, I am quite surprised that I haven't seen anyone else encountering that issue, so it may be worthwhile for some other people with the sensor to do some testing to ensure that issue doesn't only affect me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the errors go away if you increase the timeout? If you really need it, I think you could just have an outer loop and count how many tries you want to do before raising an error. No need to copy things a second time.