Phone Attitude(Device orientation)
I am having trouble finding any sources online about how to obtain the device orientation. If anybody has any knowledge about any libraries or maybe some global value that tracks this.

I am trying to modify this compass app to allow compass to function when in any orientation(not just with your phone flat).
The accelerometer readings are under /sys/bus/iio/devices/iio:device*/ where * stands for an integer depending on the kernel being used. The correct device is the one having an in_accel_x_raw file (and several other similar files, all giving you accelerometer readings if you cat them).
I was hoping there might be some kind of global value that has been through a filter combining the gyro and accelerometer. Maybe the one the OS uses for screen rotation?

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pine Phone Pro audio on phone calls: discussion, support and tips apink 42 10,687 12-26-2023, 02:14 PM
Last Post: apink
  Guide to Suitable Phone State Borealid 19 9,855 09-18-2023, 07:00 AM
Last Post: robocone
  Pine Phone won't boot into recovery mode 3 1,600 02-18-2023, 06:14 PM
Last Post: fxc
  [Mobian] No return from locked phone arno_nuehm 1 954 02-06-2023, 07:57 AM
Last Post: arno_nuehm
  Phone shuts down unexpectedly Hobgoblin 3 1,471 12-20-2022, 01:11 PM
Last Post: Fish
  Sound completely gone with Mobian in Phone Call configuration EwigeBlumenkraft 2 1,658 11-11-2022, 09:18 PM
Last Post: apink
  PinePhone Pro Manjaro Plasma Mobile Beta 13 & No Audio with Phone Calls X0X0X0X0X0 0 1,027 11-02-2022, 02:09 PM
Last Post: X0X0X0X0X0
  Outgoing audio in phone calls gone linuxfreedom 6 3,052 10-25-2022, 08:40 PM
Last Post: apink
  Phone wont turn on with any SD Card inserted Ausfaller 3 2,239 07-21-2022, 10:20 AM
Last Post: Ausfaller
  PPP Phone rings with constant vibrate - turn off vibrate henrythemouse 0 776 05-16-2022, 03:59 PM
Last Post: henrythemouse

Forum Jump:

Users browsing this thread: 1 Guest(s)