Phone Attitude(Device orientation)
#1
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 https://gitlab.com/lgtrombetta/compass/ to allow compass to function when in any orientation(not just with your phone flat).
  Reply
#2
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).
  Reply
#3
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?
  Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)