From 0545bfbd98f3f4c6af3cc76d2a05e968ef0242da Mon Sep 17 00:00:00 2001 From: Patrick Porlan Date: Tue, 27 May 2014 17:14:17 +0200 Subject: [PATCH] STPK-1429 Ignore _en status when building report maps Whether a sensor is enabled or not is irrelevant to the mapping between device report slots and individual sensors reports. Again this is a remnant of a very dynamic, but false, understanding of the structure of the buffers read from a iio character device. Issue: STPK-1429 Change-Id: Idf1727153c6786c449da2df029906e040906a319 Signed-off-by: Patrick Porlan --- control.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/control.c b/control.c index 258537f..d8372bf 100644 --- a/control.c +++ b/control.c @@ -74,20 +74,19 @@ void build_sensor_report_maps(int dev_num) int c; int n; int i; - int ch_enabled; int ch_index; char* ch_spec; char spec_buf[MAX_TYPE_SPEC_LEN]; struct datum_info_t* ch_info; int size; char sysfs_path[PATH_MAX]; - int active_channels; + int known_channels; int offset; int channel_size_from_index[MAX_SENSORS * MAX_CHANNELS] = { 0 }; int sensor_handle_from_index[MAX_SENSORS * MAX_CHANNELS] = { 0 }; int channel_number_from_index[MAX_SENSORS * MAX_CHANNELS] = { 0 }; - active_channels = 0; + known_channels = 0; /* For each sensor that is linked to this device */ for (s=0; s