Commit Graph

286 Commits

Author SHA1 Message Date
Bastien Nocera
fcfe8dfe55 docs: Ignore all our internal headers for docs
We shouldn't even be scanning those, all the docs are the D-Bus API.
2016-09-07 22:30:21 +02:00
Bastien Nocera
0a4e167792 docs: Force non-tmpl flavour
It's been obsoleted and we don't use it.
2016-09-07 22:29:48 +02:00
Bastien Nocera
d09665516c docs: No need for gtkdoc-mktmpl args, it's not run 2016-09-07 22:29:28 +02:00
Bastien Nocera
5c349f4e50 1.2 2016-09-06 15:05:37 +02:00
Bastien Nocera
50ef6baf25 README: Add Toshiba Radius 11 L10WC10C
See #89
2016-09-06 15:05:37 +02:00
Bastien Nocera
bbb0d00542 README: Add Lenovo Yoga 2 11"
See #81
2016-09-06 15:04:09 +02:00
Bastien Nocera
c7d00d278d buffer-utils: Fix possible crash handling compasses
The generic_name is supposed to be an allocated string. As we were
passing it a static string, it might have crashed later on.
2016-09-06 14:47:24 +02:00
Bastien Nocera
80126b505d compass: Fix "const char" build warning 2016-09-06 14:47:24 +02:00
Bastien Nocera
26b414681b buffer-utils: Fix "const char" build warning 2016-09-06 14:47:20 +02:00
Bastien Nocera
a9b9f626d3 fake-input-accelerometer: Fix compilation warnings 2016-09-06 14:37:17 +02:00
Javier Jardón
ae42f31390 build: Use the new AX_COMPILER_FLAGS() macro 2016-09-06 14:34:58 +02:00
Javier Jardón
99856b9b44 main: Fix shadowed variable
This fixes this compilation warning:

iio-sensor-proxy.c: In function ‘sensor_changes’:
iio-sensor-proxy.c:737:9: error: declaration of ‘i’ shadows a previous local [-Werror=shadow]
   guint i;
         ^
iio-sensor-proxy.c:710:8: note: shadowed declaration is here
  guint i;
2016-09-06 14:34:58 +02:00
Javier Jardón
69cdf0eaa5 build: Use AX_IS_RELEASE([git-directory])
See: http://www.gnu.org/software/autoconf-archive/ax_is_release.html
2016-09-06 14:34:55 +02:00
Javier Jardón
e7102bab3a build: Use upstream autoreconf in autogen.sh
Instead of the deprecated gnome-common.
2016-09-06 14:34:22 +02:00
Srinivas Pandruvada
984803bc1b buffer-utils: Fix orientation axis switch using 4.8 kernel
Using 4.8-rc kernel, orientation got flipped. The right-up became normal
and normal became right-up. The reason for this is that orientation code
of iio-sensor-proxy observes x and y swapped (actually they are not in
the data provided by IIO).

Although it is triggered by some kernel change, the reliance on
g_dir_read_name() to get the correct order of channels is not correct.
We should look at the in_xxx_x_index field and calculate correct byte
offset in the iio buffer data.

For example with 4.8 kernel: from log with added index location printed

** (process:4945): DEBUG: Built channel array for in_accel_y: index: 1, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:4945): DEBUG: Built channel array for in_accel_x: index: 0, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:4945): DEBUG: Built channel array for in_accel_z: index: 2, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0

(Here in_accel_y appeared before in_accel_x in g_dir_read_name(), because
of that channel array ordering is wrong hence location was
calculated wrong as below)
...
...
** (process:4945): DEBUG: process_scan_1: channel_index: 1, chan_name: in_accel_x, channel_data_index: 0 location: 4
** (process:4945): DEBUG: process_scan_1: channel_index: 0, chan_name: in_accel_y, channel_data_index: 1 location: 0
** (process:4945): DEBUG: process_scan_1: channel_index: 2, chan_name: in_accel_z, channel_data_index: 2 location: 8
** (process:4945): DEBUG: Read from IIO: -880449, 32851, -457812

To fix this we need to calculate the byte offset location using
channel_index not in the order they are returned by g_dir_read_name().

The easiest fix is to sort the array of channels in
build_channel_array() based on index. Also added some debug to print
index and location.

After the fix, the above log will change to:
** (process:4674): DEBUG: Built channel array for in_accel_x: index: 0, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:4674): DEBUG: Built channel array for in_accel_y: index: 1, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:4674): DEBUG: Built channel array for in_accel_z: index: 2, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0

(Sorted above, so location of byte offset is correct)

** (process:4674): DEBUG: process_scan_1: channel_index: 0, chan_name: in_accel_x, channel_data_index: 0 location: 0
** (process:4674): DEBUG: process_scan_1: channel_index: 1, chan_name: in_accel_y, channel_data_index: 1 location: 4
** (process:4674): DEBUG: process_scan_1: channel_index: 2, chan_name: in_accel_z, channel_data_index: 2 location: 8
** (process:4674): DEBUG: Read from IIO: 34804, -878496, -448046

Closes: #99
2016-09-06 14:21:46 +02:00
Bastien Nocera
0c36d3e617 drivers: Improve debug output in IIO drivers
Based on original patch by Andrea <campanella.andrea@gmail.com>

Closes: #87
2016-09-06 13:15:06 +02:00
hadess
ae82958abd Merge pull request #96 from Tofee/master
Add support for Cube i9
2016-07-18 17:57:55 +02:00
Christophe Chapuis
2abf4abf2a Add support for Cube i9
* On the Cube i9 tablet, the accelerometer is declared as KIOX000A in
   the ACPI DSDT table.
   Also, it reports the opposite of "y" compared to what is expected.

 * This has been tested on the Cube i9 with a patched kernel that fixes
   the ACPI detection by the kxcj9 driver.

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
2016-07-16 14:39:29 +02:00
Bastien Nocera
92fa6ea9ec buffer-utils: Don't warn when sensor was already enabled
Slight regression in commit 3816a34, where an already enabled sensor
would still make enable_sensors() fail.
2016-06-14 18:47:10 +02:00
Bastien Nocera
207b5bbd87 buffer-utils: Warn if a ring buffer could not be setup 2016-06-14 17:07:03 +02:00
Bastien Nocera
3816a34120 buffer-utils: Error out if no sensor is enabled in enable_sensors()
Error out if none of the sensors could be enabled, and throw a warning.
2016-06-14 17:07:03 +02:00
hadess
d0187d73ee Merge pull request #86 from bgaff/master
Update readme w/ new hardware
2016-06-01 19:14:42 +02:00
Brian Geffon
6b4960d38c README: Add Dell Inspiron 13 7000 2016-05-24 18:05:00 +08:00
Bastien Nocera
a3e0846448 monitor-sensor: Always use the same function for debug output
g_message() and g_print ("...\n") won't line up, make our little
formatting useless. Use g_print() all the time instead.
2016-05-01 00:03:02 +02:00
Bastien Nocera
82bd65de97 monitor-sensor: Add debug for iio-sensor-proxy existence 2016-04-25 12:22:45 +02:00
Bastien Nocera
cc9e5c0754 data: Fix .rules file description
We're not an iio to input proxy anymore.
2016-04-25 12:17:44 +02:00
Bastien Nocera
51b35aa301 data: Run udev rules later
40-* is too early to have some of the tags added to devices we want to
use. For example, input accelerometers wouldn't be tagged for
iio-sensor-proxy usage, as the tagging would be done in 50-*.

80 seems to be a good priority.

Closes #71
2016-04-20 18:16:09 +02:00
Bastien Nocera
d7ada809b9 data: Style fix in rules file 2016-04-20 18:13:16 +02:00
Bastien Nocera
aa9476aae5 main: By default, poll for input-style accelerometers
And stop polling when we receive an event from the kernel telling us
about coarse orientation changes.

In the future, we might want to whitelist those accelerometers that send
kevents, but it's probably just the pega_accel one that does it, and I
don't have such a machine anymore.
2016-04-19 18:29:21 +02:00
Bastien Nocera
e32f24fd7f main: Rename free_orientation_data()
It was freeing sensor data, not just orientation data.
2016-04-19 16:27:21 +02:00
Bastien Nocera
fd78d391f5 README: Add Toshiba Portégé Z10t to the tested devices
Closes #65
2016-04-19 16:27:21 +02:00
Bastien Nocera
424a86777c monitor-sensor: Print initial values 2016-04-19 14:22:16 +02:00
Bastien Nocera
29428d73bd monitor-sensor: Prettify output 2016-04-19 14:14:41 +02:00
Bastien Nocera
4c282767e0 compass: Fix incorrect GPLv2 header
The code was actually supposed to be GPLv3, but was forked from code
before we fixed it in issue #26

Closes #70
2016-03-02 13:36:22 +01:00
hadess
b78f49ddc1 Merge pull request #67 from bricewge/patch-1
Add MacBook Air 4,2 to tested devices
2016-01-04 11:58:40 +01:00
bricewge
3357e00991 Add MacBook Air 4,2 to tested devices 2016-01-03 13:25:12 +01:00
hadess
2cc2bdd3dd Merge pull request #60 from vinilox/master
README: Add lenovo yoga 2 13" to the tested devices list.
2015-11-24 14:01:17 +01:00
Vinilox
0d47570612 Add lenovo yoga 2 13" to the tested devices list. 2015-11-24 13:31:53 +01:00
Bastien Nocera
1a995e061f README: iio-sensor-proxy needs root to run
See #51
2015-10-19 12:44:15 +02:00
hadess
fa98d08765 Merge pull request #50 from djdeath/master
README: add MacBook Air 6,2 to the list of tested devices
2015-10-18 23:14:33 +02:00
Lionel Landwerlin
8f516486a5 README: add MacBook Air 6,2 to the list of tested devices 2015-10-18 22:00:15 +01:00
Bastien Nocera
e9ed168897 README: Add mention of gdbus to see current state 2015-09-17 13:33:06 +02:00
Bastien Nocera
e5ec57dca1 buffer-utils: Add more debug to the scan_elements parsing 2015-07-25 20:40:03 +02:00
Bastien Nocera
716259dcba README: Update
Closes #37
2015-07-25 19:57:33 +02:00
Bastien Nocera
4c0b154f7d 1.1 2015-07-23 15:27:48 +02:00
Bastien Nocera
cf769fdd01 docs: Remove generated file when asked to 2015-07-23 15:27:48 +02:00
Bastien Nocera
b9ef41d6fb README: Add Dell Venue 11 Pro tablet
From Jan-Michael Brummer
2015-07-18 21:16:06 +02:00
Reyad Attiyat
7b22982f76 buffer-utils: Display warning if IIO channel not found
See #38
2015-07-15 08:44:18 +02:00
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