device-samsung-p4note: adjust sensor mount matrix for iio-sensor-proxy
There is currently two different ways to handle sensors, the Linux way which is taking earth as a starting point and then drawing a vector through the device, as well as the Windows way which takes the device as a starting point and drawing a vector towards earth. iio-sensor-proxy decided to go the Windows way, therefor the configuration needs to be flipped for the readings to produce the expected result. I created an issue with iio-sensor-proxy that goes into a bit more details, see #375. Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7085>
This commit is contained in:
parent
0dc41491eb
commit
796fbdee57
2 changed files with 9 additions and 2 deletions
3
device/testing/device-samsung-p4note/90-sensors.hwdb
Normal file
3
device/testing/device-samsung-p4note/90-sensors.hwdb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# this fixes the Windows style handling of sensors in iio-sensor-proxy, see issue #375
|
||||
sensor:modalias:of:*lsm330*:*
|
||||
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-p4note
|
||||
pkgdesc="Samsung Galaxy Note 10.1"
|
||||
pkgver=4
|
||||
pkgver=5
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
|
|
@ -18,7 +18,8 @@ subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
|||
source="
|
||||
deviceinfo
|
||||
audio/HiFi.conf
|
||||
audio/p4note.conf"
|
||||
audio/p4note.conf
|
||||
90-sensors.hwdb"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
|
|
@ -31,6 +32,8 @@ package() {
|
|||
-t "$pkgdir"/usr/share/alsa/ucm2/conf.d/p4note
|
||||
install -Dm644 "$srcdir"/p4note.conf \
|
||||
-t "$pkgdir"/usr/share/alsa/ucm2/conf.d/p4note
|
||||
install -Dm644 "$srcdir"/90-sensors.hwdb \
|
||||
-t "$pkgdir"/etc/udev/hwdb.d
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
|
|
@ -47,4 +50,5 @@ sha512sums="
|
|||
b51570c46435560265eea91adc41456ec29275d3f28c88c5d85ae59a066568e864b926f29cf7a852daf27ec79eb792fb2bbd87a2ddbf1ef2f84c6b282361c0df deviceinfo
|
||||
40c2d13a8e59749a646e4070a444098609f62679f19a975da3f53b1a0fc4ac4c417dd86ec271a339e6a19c1737b384b759661d8f9a167c7eedc4a3ffbaffd77f HiFi.conf
|
||||
2c5011f7d5f25362e6249624796a6d9d36d858169538ab9c4ab1a79f37ece95f425a92b14849a65fd9281c5567753158871c6bf20a772f8dca6b2d6813ea2f03 p4note.conf
|
||||
af1dfc74ebec2f848d784c961c1b19eb1134aa62a0fd741903043466cfdec98d2c35c5b95738f63fcbdac6937e0b39be188b584b1f8cd45d98d295f32f2c882a 90-sensors.hwdb
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue