add accelerometer option - #114
Closed
mtoohey31 wants to merge 1 commit into
Closed
Conversation
Author
|
Oh whoops, I overlooked #110, sorry about the duplicate work. It looks like that one preserves the glob behaviour while this removes it; feel free to pick that if you'd prefer to keep it. |
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! Based on my experimentation, I think my device has two accelerometers (since there are multiple entries in
/sys/bus/iio/deviceswithin_accel_*_rawfiles). It seems that one is in the screen and the other is in the keyboard, so I need to force the use of the one in the screen so that the screen is rotated correctly regardless of whether the keyboard is flipped back.This pull request adds an option so that I can select the specific accelerometer I want. I've also slightly changed the logic for auto-detecting the accelerometer when one isn't specified manually so it doesn't use glob anymore.
(The diff makes the change look a little bigger actually was since I de-dented the final block because the accelerometer check happens earlier now.)