OSDN Git Service

Don't propagate timestamps to colocated poll mode sensors
authorPatrick Porlan <patrick.porlan@intel.com>
Mon, 2 Feb 2015 10:35:12 +0000 (11:35 +0100)
committerPatrick Porlan <patrick.porlan@intel.com>
Mon, 2 Feb 2015 10:35:12 +0000 (11:35 +0100)
Case study: we have incorrect timestamps on the Malata accelerometer
at the moment, and they are being forwarded to the poll-mode
thermometer that is associated to the same (MPU) iio device.
Simply rely on the timestamps constructed in the acquisition thread.

Change-Id: I7d803c71d1d4018fca3c5a8c7ca52fb05422eb0c
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
control.c

index 3751131..2bd6e17 100644 (file)
--- a/control.c
+++ b/control.c
@@ -1063,7 +1063,7 @@ static void stamp_reports (int dev_num, int64_t ts)
        int s;
 
        for (s=0; s<MAX_SENSORS; s++)
-               if (sensor[s].dev_num == dev_num && is_enabled(s))
+               if (sensor[s].dev_num == dev_num && is_enabled(s) && !sensor[s].is_polling)
                        set_report_ts(s, ts);
 }