diff options
author | xiong.huang <xiong.huang@bitland.corp-partner.google.com> | 2019-10-21 14:57:37 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-23 00:42:25 +0000 |
commit | 107327421daf5810066b9a9751e70d2269e1ac82 (patch) | |
tree | fb6baa8903b408410f1191a6dcaefc4b6a5af5ee | |
parent | ab18c5ac746d3f332700fd13ed390359a3611a93 (diff) | |
download | chrome-ec-107327421daf5810066b9a9751e70d2269e1ac82.tar.gz |
Kodama: fix rotation matrix of lid sensor
Adjust the rotation matrix of lid sensor to ensure auto-rotate function
works as expected.
BUG=b:142562612
BRANCH=kukui
TEST=1. Work well in UI when rotate DUT.
2. The values returned by the accelerometers must match the axes
used by android or w3c:
https://source.android.com/devices/sensors/sensor-types,
https://www.w3.org/TR/accelerometer/#model
device on table: in_accel_z_raw >> 0 (a very large positive value)
e.g. X(65), Y(134), Z(8245)
device on its default bottom edge: in_accel_y_raw >> 0 (a very
large positive value)
e.g. X(-17), Y(8141), Z(164)
device on its default left edge: in_accel_x_raw >> 0 (a very large
positive value)
e.g. X(8107), Y(-79), Z(-174)
Change-Id: Id570e3665e2c7165a0f43dccc988a157fa7eda29
Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871274
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
-rw-r--r-- | board/kodama/board.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/kodama/board.c b/board/kodama/board.c index 0650301731..9178c2cf4d 100644 --- a/board/kodama/board.c +++ b/board/kodama/board.c @@ -245,8 +245,8 @@ static struct lsm6dsm_data lsm6dsm_data; /* Matrix to rotate accelerometer into standard reference frame */ static const mat33_fp_t lid_standard_ref = { + {0, FLOAT_TO_FP(1), 0}, {FLOAT_TO_FP(-1), 0, 0}, - {0, FLOAT_TO_FP(-1), 0}, {0, 0, FLOAT_TO_FP(1)} }; |