Files
OpenCellular/include
Aseda Aboagye b3a9e1b64c motion_sense: Add "spoof" mode
This commit adds a "spoof" mode feature to the motionsense stack.  It
allows the user to arbitrarily set the outputs of the sensor in order to
"spoof" the readings of the sensor.  This can be useful in emulating
tablet mode or device rotations.  A command is available from the EC
console named `accelspoof` and there is a corresponding motionsense
command in ectool called `spoof`.

The usage is as follows:

- EC console
 > accelspoof [id] [on/off] [X Y Z]

- ectool
 # ectool motionsense spoof -- [id] [0/1] [X Y Z]

If on or off(or 0/1) is not specified, the current spoof mode status of
the sensor is returned.  If on is specified, but no components are
provided, the sensor will lock the current values and provide those as
the spoofed values.  If the components are provided, those will be used
as the spoofed values.

BUG=chromium:675263
BRANCH=cyan,glados,gru,oak
TEST=Flash a DUT with accels.  From AP console, run `ectool motionsense
lid_angle` in a loop, use 'accelspoof' EC console command to set spoofed
values.  Verify that the angle is fixed regardless of the actual angle
of the DUT.
TEST=Flash a DUT with accels.  From AP console, use `ectool motionsense
spoof` to spoof values and verify that `ectool motionsense` reflects the
spoofed values.  Test with both provided component values and no
component values.

Change-Id: Ie30688d22f38054e7243b1af493a3092b2cdfb72
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/421280
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
2017-01-07 13:29:52 -08:00
..
2017-01-07 13:29:52 -08:00
2016-05-26 16:17:26 -07:00
2013-12-17 21:27:53 +00:00
2016-11-15 17:41:53 -08:00
2017-01-05 13:43:39 -08:00
2017-01-07 13:29:52 -08:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-07-27 22:19:16 +00:00
2014-02-08 00:14:48 +00:00
2017-01-07 13:29:52 -08:00
2013-10-25 20:12:49 +00:00
2015-06-10 18:24:05 +00:00
2015-05-27 03:58:16 +00:00
2016-04-27 14:04:07 -07:00
2015-05-27 03:58:16 +00:00
2016-09-07 14:01:18 -07:00
2013-06-26 09:08:23 -07:00
2011-12-07 19:10:02 +00:00
2016-11-08 17:11:28 -08:00
2017-01-07 13:29:52 -08:00
2012-10-25 14:12:11 -07:00
2015-10-07 17:51:36 -07:00
2016-07-29 10:51:22 -07:00
2015-06-18 19:07:00 +00:00
2016-12-05 16:43:18 -08:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2016-11-15 17:41:53 -08:00
2015-12-21 14:58:54 -08:00
2016-11-08 17:11:28 -08:00
2016-07-11 21:27:46 -07:00
2015-09-16 14:49:46 -07:00
2015-06-18 19:07:00 +00:00
2016-11-02 17:39:56 -07:00
2015-01-20 20:56:43 +00:00