Commit Graph

138 Commits

Author SHA1 Message Date
Reyad Attiyat
1e849e7406 compass: Fix compass not working on Surface Pro 2
The _raw is not needed in the channel name for process_scan_1().
This function looks up the channel from its channel name (in this
case "in_rot_from_north_magnetic_tilt_comp").

The channel name is read from the file ending in _en from the
scanning_element folder, in build_channel_array().

Closes #38
2015-07-15 08:44:05 +02:00
Bastien Nocera
c6a2547204 light: Explain why we use Lux even if IIO says unitless readings
Closes #35
2015-07-15 07:21:01 +02:00
Jan-Michael Brummer
0975741edb accel: Apply scale for IIO buffered acceleration
Always apply the scale from the IIO readings. This fixes acceleration
values on the Dell Venue 11 Pro (7140) tablet.
2015-07-11 14:36:09 +02:00
Bastien Nocera
d79eb01412 compass: Only apply scale from the IIO readings
No need to read it ahead of time, and sanitise it.
2015-07-11 14:35:07 +02:00
Bastien Nocera
0eeda7b24f buffer-utils: Sanitise empty scale values
In case we can't read a scale from the IIO buffer, make sure that the
scale is set to 1.0 (no changes) rather than 0.0.
2015-07-11 14:31:38 +02:00
Bastien Nocera
23756fb62c README: Add X1 Carbon 2014 to the tested devices 2015-07-08 15:54:41 +02:00
Bastien Nocera
ff90d5f60b README: Update GNOME requirements 2015-07-08 15:54:33 +02:00
Bastien Nocera
92ccf349d9 main: Fix error message when we fail to own D-Bus service
As we can reach that handler if we're either running already, or if the
D-Bus .service file is not installed properly.

Closes #36
2015-07-05 22:17:26 +02:00
Benjamin Tissoires
f04fe60af3 main: Apply scale from readings for IIO buffered drivers
Add a scale output parameter in process_scan_1 so that we pass scale
information from each driver read to the driver, and apply the scale
before passing it on to the main daemon.

Closes #28
2015-07-01 18:36:55 +02:00
Bastien Nocera
0974fe628f main: Fix build on Debian Sid
With help from @volkov0aa

Closes: #33
2015-06-26 09:56:42 +02:00
Zeeshan Ali (Khattak)
a67e185fe9 fake-compass: Reset angle when it goes beyond 360° 2015-06-12 14:16:16 +02:00
Bastien Nocera
8d762804f4 main: Fix fake ALS driver
Looks like g_udev_device_get_name() returns unhelpful names like
"event0" and the likes. Compare it to the "NAME" property instead.
2015-06-08 16:12:29 +02:00
Zeeshan Ali (Khattak)
87ce726b83 main: Add fake compass
Note that it won't be usable at the same time as the fake ALS driver.
2015-06-08 16:12:21 +02:00
Bastien Nocera
dc9edbd892 monitor-sensor: Read compass properties from correct proxy 2015-06-08 15:37:45 +02:00
Bastien Nocera
28aa1df6c8 main: Fix monitor not receiving Compass property changes
When sending Compass property changes, make sure to sure the right
interface name when building the property tuple for the signal.
2015-06-08 15:29:21 +02:00
Bastien Nocera
11f052167a main: Add debug for the Claim/Release calls 2015-06-08 15:21:09 +02:00
Bastien Nocera
57e509633e main: Simplify compass-related methods 2015-06-08 15:20:55 +02:00
Bastien Nocera
37d39a3347 data: Update D-Bus configuration again
This fixes introspection not working for normal users on the interface
that's available to every user.
2015-06-08 15:08:35 +02:00
Bastien Nocera
5da1c5e541 monitor-sensor: Fix typo in HasCompass property
This would have stopped the HasCompass property from printing.

Spotted by Matthias Clasen <mclasen@redhat.com>
2015-06-04 13:07:12 +02:00
Bastien Nocera
1ab0fcc40d main: Read compass readings from the correct file
And apply scaling as it is advertised by the device.
2015-06-04 12:03:09 +02:00
Bastien Nocera
5b6341b878 monitor-sensor: Fix ClaimCompass method call 2015-06-03 14:02:32 +01:00
Bastien Nocera
6c03aa3011 monitor-sensor: Add support for new Compass interface 2015-06-03 14:01:12 +01:00
Bastien Nocera
7764b2afd9 monitor-sensor: Remove unused variables 2015-06-03 14:00:58 +01:00
Bastien Nocera
1fb9a3561f data: Allow users to introspect the main interface 2015-06-03 13:55:44 +01:00
Bastien Nocera
53436ac990 main: Limit access to compass to Geoclue
Only geoclue can now access the Compass information, as we've moved it
to a separate object path and interface name.

Closes #29
2015-06-03 13:45:40 +01:00
Bastien Nocera
bc10a639ec docs: Mention the object path in the API docs 2015-06-03 13:45:20 +01:00
Bastien Nocera
f787895ae8 main: Fix warning when client disappears
When a client disappears, check whether there is a driver to disable
before turning off polling.

Fixes this warning:
CRITICAL **: driver_set_polling: assertion 'driver' failed
2015-06-03 13:11:08 +01:00
Bastien Nocera
6ee84d93d1 main: Fix send_driver_changed_dbus_event() for compass 2015-06-03 13:02:44 +01:00
Bastien Nocera
cd79219e1d docs: Fix method name typos in API docs 2015-06-03 11:45:27 +01:00
Bastien Nocera
e5b7b3bbe1 main: Fix ReleaseLight method not working 2015-06-03 11:45:27 +01:00
Bastien Nocera
b655a4c2e9 monitor-sensor: Add Compass support 2015-06-03 11:45:27 +01:00
Elad Alfassa
e6c9f23260 main: Add IIO buffering compass driver
Note that there's a hard-coded hack to scale the readings properly on
one device. This will soon be fixed in the kernel's HID sensor driver,
handling the exponent scale exported by sensors.
2015-06-03 11:43:27 +01:00
Elad Alfassa
42929a882a main: Workaround sysfs attributes naming quirk for compasses
In most IIO sensor types, _scale and _offset is added to the scan element base
name, for example:
in_accel has in_accel_scale and in_accel_offset

For compasses, this is different. Instead of being named
in_rot_from_north_magnetic_tilt_scale aand similar, the _scale and_offset
attributes are named in_rot_scale and in_rot_offset.

This commit adds a workaround to special-case the attribute naming for this
type of sensor.
2015-06-03 11:43:27 +01:00
Elad Alfassa
b103c0d6cd main: Add compass support
Note that the API is still not set in stone, as the API docs mentions
that we'll only want to export that information to Geoclue. This hasn't
been implemented yet.

Co-authors: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
Bastien Nocera <hadess@hadess.net>
2015-06-03 11:42:33 +01:00
Bastien Nocera
ff31f6e6ed build: Use configure, not autogen.sh
Those are instructions to build from tarball
2015-05-27 11:17:12 +02:00
hadess
44a0d71bc9 Merge pull request #27 from miguxbe/patch-2
Update README
2015-05-27 11:16:36 +02:00
Bastien Nocera
6d2fff6c10 COPYING: Clarify GPL v3 license
Closes #26
2015-05-27 11:13:46 +02:00
Miguel Vaello
547b332aae Update README
- Added autogen line to installation section
- Added MacBook Pro to tested devices list
2015-05-25 10:16:38 +02:00
Bastien Nocera
0d6e31c104 README: Fix description 2015-05-24 22:16:09 +02:00
Bastien Nocera
abf48d015d rules: Make hwmon light sensor support more generic
Even if it's used in MacBooks, hwmon compatible sensors also exist on
other laptops, such as some Samsung laptops. Make sure we can support
those too.
2015-05-24 16:22:34 +02:00
Bastien Nocera
5436d07fb0 rules: Add missing systemd TAG to autostart daemon
The daemon wasn't starting on, at least, MacBooks because the systemd
tag was missing, not starting the systemd iio-sensor-proxy.service unit.

Closes #25
2015-05-24 16:20:58 +02:00
Bastien Nocera
30d4550658 hwmon-light: Fix sending floods of readings
When enabling polling, we'd set up an idle, instead of a timeout.
2015-05-24 15:52:53 +02:00
Cristian Rodríguez
3be00360be rules: Don't override SYSTEMD_WANTS
Something else might need it too
2015-05-24 15:28:52 +02:00
Cristian Rodríguez
ea1801cea6 rules: Fix ACTION equality check
ACTION=add --> ACTION==add
2015-05-24 15:28:01 +02:00
Bastien Nocera
66e3d9470f 1.0 2015-05-22 16:16:20 +02:00
Bastien Nocera
3eb4ecc139 build: Install D-Bus config file in $(sysconfdir)
Rather than hard-coding /etc
2015-05-22 16:16:20 +02:00
Bastien Nocera
853371b9b1 build: Add --with-systemdsystemunitdir configure option 2015-05-22 16:16:20 +02:00
Bastien Nocera
6bd7e248ab data: Add --with-udevrulesdir configure option 2015-05-22 16:16:20 +02:00
Bastien Nocera
158269e888 build: Require a newer version of gtk-doc
To avoid deprecation warnings.
2015-05-22 16:02:26 +02:00
Bastien Nocera
147df434e2 NEWS: Add forgotten 0.1 release 2015-05-22 15:47:28 +02:00