Repository navigation
Conversation
Allow selecting the base or display raw accelerometer for screen orientation without changing sensor discovery or calibrated hinge inputs. Keep the base sensor as the default and document the systemd override. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| return; | ||
|
|
||
| if (drv_data->mode != 1) | ||
| new_orient = MXC_ORIENT_RIGHT; |
There was a problem hiding this comment.
I think your fix makes this band-aid redundant too: it's meant to ensure the laptop never rotates unless it's in tablet mode, but I only added it because of unexpected / erratic rotations that I now suspect were happening because it was detecting orientation changes in the base.
There was a problem hiding this comment.
Actually, I take it back: because we stop reading sensors when the laptop is closed, reopening can have an unexpected orientation if this isn't there.
|
Thank you for the PR! I'm inclined to think we should make |
|
I spent a little bit investigating how the Windows driver works. It assumes display is the first sensor that ACPI returns via the Long story short, happy to merge this, but I'd recommend just always using |
|
Incorporated into #33 which makes sensor selection automatic. |
Closes #23.
What changed
MINIBOOK_ORIENTATION_SENSOR=base|displaybaseas the defaultWhy
Controlled movement tests on a MiniBook X showed that
raw1is in the base andraw2is in the display. Selecting the display sensor makes automatic rotation follow the screen. Using calibrateda2is not correct for orientation because its matrix also reverses Y and Z.Validation
test-mxc6655-accel-claimpasses, including the new selector casesgit diff --checkpassesMINIBOOK_ORIENTATION_SENSOR=display