iio-sensor-proxy: implement partial magnetometer support
This commit is contained in:
parent
a234e57d89
commit
ddb904ae19
1
TODO.md
1
TODO.md
@ -128,6 +128,7 @@
|
||||
- this is a problem of playerctld, i guess
|
||||
- add option to change audio output
|
||||
- moby: tune GPS
|
||||
- fix iio-sensor-proxy magnetometer scaling
|
||||
- tune QGPS setting in eg25-control, for less jitter?
|
||||
- configure geoclue to do some smoothing?
|
||||
- manually do smoothing, as some layer between mepo and geoclue?
|
||||
|
@ -15,21 +15,30 @@
|
||||
#
|
||||
# HARDWARE SUPPORT: PINEPHONE (2024/07/01)
|
||||
# - 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>
|
||||
# - 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`
|
||||
# - nothing in iio-sensor-proxy reads anything related to "magn".
|
||||
# - my sensor is af8133j -- different but similar to lis3mdl listed in issue report,
|
||||
# - seems i could add a new "polling" iio-sensor-proxy driver which reads the data from sysfs pretty easily.
|
||||
# not sure how much post-processing needs to happen on that data, but i doubt it's too much?
|
||||
# - TODO: try using this implementation that's out for PR: <https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/316>
|
||||
{ config, lib, ... }:
|
||||
# - WIP PR to support magnetometers: <https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/316>
|
||||
# - after rebase, it *functions*, but does not scale the readings correctly
|
||||
# heading changes only over the range of 50 - 70 deg.
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.iio-sensor-proxy;
|
||||
in
|
||||
{
|
||||
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
|
||||
};
|
||||
services.udev.packages = lib.mkIf cfg.enabled [ cfg.package ];
|
||||
|
Loading…
Reference in New Issue
Block a user