diff options
author | Lu Zhang <lu.zhang@bitland.corp-partner.google.com> | 2019-10-21 15:01:27 +0800 |
---|---|---|
committer | Justin TerAvest <teravest@chromium.org> | 2019-10-22 17:35:45 +0000 |
commit | 1352bf98aa3f85678421dda4f705b7f196275458 (patch) | |
tree | 6516f4ff30693bf0bfab63442af17b6b9c92c686 /board/akemi | |
parent | e171fb8d7b131f7a1953d83aa702569f59a02501 (diff) | |
download | chrome-ec-1352bf98aa3f85678421dda4f705b7f196275458.tar.gz |
akemi: fix rotation matrix of base sensor
The rotation matrix needs be filled out into standard reference frame.
BUG=b:143045241
BRANCH=none
TEST=Using ec console 'accelinfo on' verified lid angle now goes
from 0 to 360 and swtiches to tablet mode after crossing 180 threshold.
Change-Id: I615ac3c582f7deec681c638a79b59324c9b69584
Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871276
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'board/akemi')
-rw-r--r-- | board/akemi/board.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/board/akemi/board.c b/board/akemi/board.c index 92b7599fb3..4a17688070 100644 --- a/board/akemi/board.c +++ b/board/akemi/board.c @@ -175,16 +175,11 @@ static struct lsm6dsm_data lsm6dsm_data; /* Matrix to rotate accelrator into standard reference frame */ static const mat33_fp_t base_standard_ref = { - { 0, FLOAT_TO_FP(1), 0}, { FLOAT_TO_FP(-1), 0, 0}, - { 0, 0, FLOAT_TO_FP(1)} + { 0, FLOAT_TO_FP(1), 0}, + { 0, 0, FLOAT_TO_FP(-1)} }; -/* - * TODO(b/124337208): P0 boards don't have this sensor mounted so the rotation - * matrix can't be tested properly. This needs to be revisited after EVT to make - * sure the rotaiton matrix for the lid sensor is correct. - */ static const mat33_fp_t lid_standard_ref = { { 0, FLOAT_TO_FP(-1), 0}, { FLOAT_TO_FP(-1), 0, 0}, |