Skip to content

add accelerometer option - #114

Closed
mtoohey31 wants to merge 1 commit into
efernau:masterfrom
mtoohey31:accelerometer-option
Closed

add accelerometer option#114
mtoohey31 wants to merge 1 commit into
efernau:masterfrom
mtoohey31:accelerometer-option

Conversation

@mtoohey31

@mtoohey31 mtoohey31 commented Aug 3, 2025

Copy link
Copy Markdown

Hello! Based on my experimentation, I think my device has two accelerometers (since there are multiple entries in /sys/bus/iio/devices with in_accel_*_raw files). 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.)

@mtoohey31

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant