Files
OpenCellular/common
Gwendal Grignou 1dce89f8b4 motion: Fix last timestamp calculation
last_collection is used for sensor in forced mode to be sure we are not
calling the read routine too often. We should update last_collection even
when the reading fails, and not on the interrupt path.

For sensors that support interrupt, the new timing diagram is:

              /-------- data rate period ---------\
--------------+------------------------------------+-----------------> t
              |                     /\
              read (sample request)  |
              |                      Interrupt (sample available)
              \/                     |
                sensor

BUG=chrome-os-partner:59423
BRANCH=reef
TEST=Check the ALS read is not called too often even when the sensor
reports an error because the read value is not changed.

Change-Id: I2def7bbd5227cf373c1f613c9b70bc6215861008
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/424222
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2016-12-28 21:49:35 -08:00
..
2016-11-08 17:11:28 -08:00
2015-05-19 02:46:27 +00:00
2016-11-15 17:41:53 -08:00
2016-11-15 17:41:53 -08:00
2016-04-27 14:04:07 -07:00
2016-09-07 14:01:18 -07:00
2016-11-08 17:11:28 -08:00
2015-09-25 09:13:34 -07:00
2014-01-14 09:19:45 +00:00
2016-03-02 13:39:47 -08:00
2016-11-15 17:41:53 -08:00
2016-11-15 17:41:53 -08:00
2016-07-29 10:51:22 -07:00
2014-05-17 20:14:17 +00:00
2016-05-05 19:16:50 -07:00
2016-03-21 16:35:33 -07:00
2016-11-08 17:11:28 -08:00
2016-11-02 17:39:56 -07:00
2016-08-22 23:27:24 -07:00
2015-09-24 12:46:28 -07:00