iio-sensor-proxy: implement partial magnetometer support
This commit is contained in:
1
TODO.md
1
TODO.md
@@ -128,6 +128,7 @@
|
|||||||
- this is a problem of playerctld, i guess
|
- this is a problem of playerctld, i guess
|
||||||
- add option to change audio output
|
- add option to change audio output
|
||||||
- moby: tune GPS
|
- moby: tune GPS
|
||||||
|
- fix iio-sensor-proxy magnetometer scaling
|
||||||
- tune QGPS setting in eg25-control, for less jitter?
|
- tune QGPS setting in eg25-control, for less jitter?
|
||||||
- configure geoclue to do some smoothing?
|
- configure geoclue to do some smoothing?
|
||||||
- manually do smoothing, as some layer between mepo and geoclue?
|
- manually do smoothing, as some layer between mepo and geoclue?
|
||||||
|
@@ -15,21 +15,30 @@
|
|||||||
#
|
#
|
||||||
# HARDWARE SUPPORT: PINEPHONE (2024/07/01)
|
# HARDWARE SUPPORT: PINEPHONE (2024/07/01)
|
||||||
# - accelerometer and light sensor seem to work
|
# - accelerometer and light sensor seem to work
|
||||||
# - magnetometer IS NOT SUPPORTED
|
# - magnetometer (af8133j, different but similar to lis3mdl) IS NOT SUPPORTED
|
||||||
# - <https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/310>
|
# - <https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/310>
|
||||||
# - exists in sysfs and can be viewed with
|
# - exists in sysfs and can be viewed with
|
||||||
# `cat /sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-001c/iio:device2/in_magn_x_raw`
|
# `cat /sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-001c/iio:device2/in_magn_x_raw`
|
||||||
# - nothing in iio-sensor-proxy reads anything related to "magn".
|
# - nothing in iio-sensor-proxy reads anything related to "magn".
|
||||||
# - my sensor is af8133j -- different but similar to lis3mdl listed in issue report,
|
# - WIP PR to support magnetometers: <https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/316>
|
||||||
# - seems i could add a new "polling" iio-sensor-proxy driver which reads the data from sysfs pretty easily.
|
# - after rebase, it *functions*, but does not scale the readings correctly
|
||||||
# not sure how much post-processing needs to happen on that data, but i doubt it's too much?
|
# heading changes only over the range of 50 - 70 deg.
|
||||||
# - TODO: try using this implementation that's out for PR: <https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/316>
|
{ config, lib, pkgs, ... }:
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
let
|
||||||
cfg = config.sane.programs.iio-sensor-proxy;
|
cfg = config.sane.programs.iio-sensor-proxy;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sane.programs.iio-sensor-proxy = {
|
sane.programs.iio-sensor-proxy = {
|
||||||
|
packageUnwrapped = pkgs.iio-sensor-proxy.overrideAttrs (upstream: {
|
||||||
|
patches = (upstream.patches or []) ++ [
|
||||||
|
(pkgs.fetchpatch {
|
||||||
|
name = "WIP:compass: Add support for polling uncalibrated devices";
|
||||||
|
# url = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/316.diff";
|
||||||
|
url = "https://git.uninsane.org/colin/iio-sensor-proxy/commit/fd21f1f4bf1eadd603b1f24f628b979691d9cf3b.diff";
|
||||||
|
hash = "sha256-+GoEPby6q+uSkQlZWFWr5ghx3BKBMGk7uv/DDhGnxDk=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
});
|
||||||
enableFor.system = lib.mkIf (builtins.any (en: en) (builtins.attrValues cfg.enableFor.user)) true; #< for dbus/polkit policies
|
enableFor.system = lib.mkIf (builtins.any (en: en) (builtins.attrValues cfg.enableFor.user)) true; #< for dbus/polkit policies
|
||||||
};
|
};
|
||||||
services.udev.packages = lib.mkIf cfg.enabled [ cfg.package ];
|
services.udev.packages = lib.mkIf cfg.enabled [ cfg.package ];
|
||||||
|
Reference in New Issue
Block a user