Commit Graph

276 Commits

Author SHA1 Message Date
Bastien Nocera
11fbb0096d main: Only send properties that did change
Closes #20
2015-05-19 22:23:53 +02:00
Bastien Nocera
68ea66b6ca fake-input-accelerometer: Don't start with an undefined orientation
This data will likely be available already.
2015-05-19 22:22:28 +02:00
Bastien Nocera
b3626c9bac monitor-sensor: Only print properties that changed 2015-05-19 22:05:09 +02:00
Bastien Nocera
0ddb4362d7 main: Add wrappers for vfuncs 2015-05-19 19:14:47 +02:00
Bastien Nocera
bd4207f47a monitor-sensor: Print values as well 2015-05-19 18:50:22 +02:00
Bastien Nocera
a904cff8cd main: Add monitor-sensor test program 2015-05-19 18:28:34 +02:00
Bastien Nocera
ce70cfef18 main: Add Claim/Release D-Bus methods
Each client will now have to call "Claim" for the values to start
updating, and "Release" when they're done (they can also leave the bus,
but that's more complicated to achieve).

Closes: #11
2015-05-19 18:28:34 +02:00
Bastien Nocera
963ee096df drivers: Add set_polling() method to drivers
When the driver needs to poll, ensure that we can easily disable that
polling to reduce wakeups.

This temporarily breaks the daemon.
2015-05-19 18:14:57 +02:00
Bastien Nocera
3ea494832b main: Move any_sensors_left() helper function 2015-05-19 16:34:22 +02:00
hadess
f83430c122 Merge pull request #14 from elad661/update-readme
README: Add the Lenovo ThinkPad Twist as a tested model
2015-03-24 17:04:09 +01:00
Elad Alfassa
9da9bc6328 README: Add the Lenovo ThinkPad Twist as a tested model 2015-03-24 17:52:08 +02:00
Elad Alfassa
c7fb43e0d5 main: Add IIO buffering Light Sensor driver
Such as the one on the Thinkpad Twist
2015-03-24 15:49:15 +01:00
Elad Alfassa
d486aadd0e main: Split iio buffering sensors utility functions to a helper file 2015-03-24 15:49:15 +01:00
Elad Alfassa
f9236bcada main: Fix typo in iio polling light sensor driver name 2015-03-24 14:57:43 +01:00
Bastien Nocera
27f4a55711 main: Rework D-Bus setup
Simplify D-Bus setup, and do it as early as possible. Running
iio-sensor-proxy when another instance is already running will not throw
an error now.

Closes #12
2015-03-20 13:35:54 +01:00
Bastien Nocera
97b0c0a075 rules: Auto-start iio-sensor-proxy for Apple SMC light sensors 2015-03-19 16:11:57 +01:00
Bastien Nocera
ea46714d91 main: Add HWMon light sensor support
As used on Mac laptops. Note that some devices have multiple sensors.
As advised in Microsoft documentation, we will only use the values
from the sensor with the highest value, to avoid problems with potentially
obscured sensors.

Tested on MacBookPro8,2
2015-03-19 16:05:11 +01:00
Bastien Nocera
dba141da81 main: Add IIO polling Light Sensor driver 2015-03-13 13:56:40 +01:00
Bastien Nocera
c6d688f13d main: Indentation changes in fake light sensor driver 2015-03-13 13:56:18 +01:00
Bastien Nocera
b9c2b44ed8 main: Make sure fake light sensor can be stopped early
By reusing the same source ID for both the idle and the timeout.
2015-03-13 13:35:33 +01:00
Bastien Nocera
8ab67c6fe3 main: Check for subsystem when initialising drivers
There's no need to do any more checks on the device
if the subsystem doesn't match.
2015-03-13 13:32:59 +01:00
Bastien Nocera
4cfe39899a build: Add missing files and headers
Closes #9
2015-03-07 14:55:07 +01:00
Bastien Nocera
7d226295da main: Add ALS reading unit
Either "lux" or "vendor".
2015-03-06 10:40:23 +01:00
Bastien Nocera
1a28ce6568 main: Add a Fake light driver
Have your own fake light sensor started with:
FAKE_LIGHT_SENSOR=1 ./iio-sensor-proxy
2015-03-05 18:05:33 +01:00
Bastien Nocera
4b1fb8db28 main: Add Light sensors as a possible driver type
This means:
- reworking the driver callbacks so they can pass more than x/y/z
- handling sensors going (not just one single sensor anymore)
2015-03-05 18:04:57 +01:00
Bastien Nocera
5ac84a8ceb main: Make accelerometer one of a type of drivers 2015-03-05 17:38:19 +01:00
Bastien Nocera
4b873a049b rules: Auto-start iio-sensor-proxy for input accels too 2015-03-05 16:05:11 +01:00
Bastien Nocera
7ba7e4cbca main: Add test tool for orientations
Given an x/y/z, give out the orientation if it was previously undefined.
2015-03-05 10:47:07 +01:00
Bastien Nocera
a1b721ebf3 main: Separate out orientation code 2015-03-05 10:47:07 +01:00
Bastien Nocera
5c28fa9606 main: Add a fake accel to test the new input driver 2015-03-05 10:47:07 +01:00
Bastien Nocera
8bc50a306c main: Add support for input driver accelerometers 2015-03-05 10:47:07 +01:00
Bastien Nocera
fd4b7f7d65 main: Use D-Bus instead of uinput
Instead of exporting the orientation state using a combination of
uinput and udev, use D-Bus.
2015-03-05 10:47:07 +01:00
Bastien Nocera
186eb78298 main: Const'infy 2 strings in the buffered driver 2014-11-25 01:56:07 +01:00
Jan-Michael Brummer
d9854b312a main: Skip processing if the device returns EAGAIN
Skip process_scan() in case we are receiving EGAIN from read.
2014-11-25 01:50:38 +01:00
Jan-Michael Brummer
16c2635cd6 main: Fix compiling issues in buffered accelerometer 2014-11-25 01:49:14 +01:00
Bastien Nocera
748176bcee main: Fix memleak in buffer driver 2014-11-24 09:13:31 +01:00
Bastien Nocera
3f33643f95 main: Fix missing dev_path and dev_dir_path assignments 2014-11-24 09:12:34 +01:00
Bastien Nocera
742837303a main: Fix open() retval of buffer driver 2014-11-24 09:07:18 +01:00
Bastien Nocera
4a5fb99b34 README: Add more tested models
Though it's possible things have slightly regressed...
2014-11-20 05:41:00 +01:00
Bastien Nocera
348fc043e6 data: Correct path to binary in service file 2014-11-20 05:39:51 +01:00
Bastien Nocera
43f5f0194a build: Install helper in sbin, not bin 2014-11-20 05:37:51 +01:00
Bastien Nocera
0a21b826e3 main: Add quirk for the Onda v975w to the poll driver 2014-11-20 05:32:42 +01:00
Bastien Nocera
6a63023a7f main: Move quirk into driver
This is a common quirk for hid based sensors it seems.
2014-11-20 05:32:42 +01:00
Bastien Nocera
ea1ba3807d main: Fix unchanging accel values in polling driver
g_udev_device_get_sysfs_attr_as_int() uses libudev internally, which
does caching. This means that the values wouldn't have changed past
the first read.
2014-11-20 00:20:59 +01:00
Bastien Nocera
126b758323 main: Fix scale handling in IIO drivers
Our code expects 256 to corresponds to 1G acceleration.
IIO drivers give out a value that, when multiplied by the scale, gives
an acceleration in m/s².

Do the math to transform the IIO sensor's value to the scale we use
internally.
2014-11-20 00:17:10 +01:00
Bastien Nocera
f1adea43f4 main: Fix open() for the polling driver 2014-11-19 21:25:57 +01:00
Bastien Nocera
0fedce7124 main: Fix warning on 32-bit
error: format ‘%lX’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘guint64’
2014-11-19 20:55:25 +01:00
Bastien Nocera
cf07e42524 main: Add driver for polling IIO 2014-11-19 20:34:05 +01:00
Bastien Nocera
e93182c62e main: Split IIO code into its own driver
And implement a driver scheme.
2014-11-19 20:06:49 +01:00
Bastien Nocera
07897adea3 build: Autotoolify 2014-11-19 17:03:45 +01:00