Bastien Nocera
53ca7989ec
main: Don't warn when Claim* is called twice in a row
...
Again, makes it easier for clients.
2015-05-21 16:03:02 +02:00
Bastien Nocera
035ad06eae
main: Make Claim* calls work before sensor is available
...
It's tedious for clients to know whether they can call Release* when
sensors disappear, or making sure that the device is claimed before
releasing it when they go in power save mode.
You can now claim the sensor whether it's available or not, and it will
automatically start sending out the updates when it appears.
Closes #23
2015-05-21 15:45:33 +02:00
Bastien Nocera
2b24dfde61
build: Fix distcheck (somewhat)
...
The systemd files still aren't installable inside the prefix.
2015-05-21 12:07:00 +02:00
Bastien Nocera
23f9ea942a
main: Add missing GResource file
2015-05-21 11:56:50 +02:00
Bastien Nocera
785dbcd4a2
main: Split "Claim" into per-driver-type methods
...
replace "Claim + weird driver type string" with "ClaimAccelerometer" and
"ClaimLight" methods.
Ditto with "Release"
2015-05-20 11:15:02 +02:00
Bastien Nocera
8fd1a46c8d
main: Update copyright headers
...
And remove documentation from it, it should all be in the newly added
docs.
2015-05-20 10:44:52 +02:00
Bastien Nocera
c697fee81f
main: Use GResource to share introspection XML data
...
So the same file is used to generate the docs and export the D-Bus
object.
2015-05-20 10:38:31 +02:00
Bastien Nocera
84401a0e0f
docs: Add gtk-doc documentation
...
Closes #8
2015-05-20 10:13:04 +02:00
Bastien Nocera
8976cd10c3
main: Fix possible crash in sensor_changes()
...
We were passing "i", the counter over the number of drivers, and not the
counter over the number of driver *types*.
2015-05-19 22:24:56 +02:00
Bastien Nocera
f2878cc8a3
main: Tell clients when sensors (dis)appear
2015-05-19 22:24:20 +02:00
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