Aseda Aboagye df09bc2c83 motion_lid: Increase precision in noisy mag check.
This commit increases the precision used in the noisy magnitude
deviation check by multiplying the scaled sensor data by 8 in the
intermediate calculations.  Prior to this, due to some bits being lost,
certain devices would determine the lid angle as unreliable in specific
angles, even though the device was at rest.

BUG=b:63148973
BRANCH=eve,gru,reef
TEST=Flash bob, set DUT on desk, run `while true; do ectool motionsense
lid_angle; sleep 0.1; done`, slowly move the lid from 15 degrees until
~350.  Verify that no particular angle results in a unreliable lid angle
reading.
TEST=Run `evtest` and examing cros-ec-buttons, fold screen all the way
back to make tablet mode, shake device for at least 30s.  Verify that
there are no spurious transitions of the tablet mode switch.
TEST=Repeat above tests on kevin.

Change-Id: Iff06c1df2dd33c60e26a59183f62f29b71548729
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/567050
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-07-13 08:32:58 -07:00
2017-07-08 20:38:53 -07:00
2012-05-11 09:11:52 -07:00
2014-04-02 19:58:53 +00:00
2015-12-08 20:05:05 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%