diff options
author | Devin Lu <devin.lu@quantatw.com> | 2019-10-17 09:48:04 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-18 01:20:11 +0000 |
commit | 29e9992a97b9fe96ae58a3a747fad0b0c2851314 (patch) | |
tree | 0b0b3a2f8a07ac0f8766bd812899d05318e66290 | |
parent | 5a1de9ecdf083576ea72e9cf9200854aaf00fa02 (diff) | |
download | chrome-ec-29e9992a97b9fe96ae58a3a747fad0b0c2851314.tar.gz |
dratini: correct accel orientation
BUG=none
BRANCH=none
TEST=When device is laying on a table, lid angle at 180, both sensors
report gravity along Z axis:
localhost ~ # ectool motionsense
Motion sensing active
Sensor 0: -1040 4336 15408
Sensor 1: 760 -291 17127
Sensor 2: 0 0 0
When on the base bottom edge, report gravity along Y axis:
localhost ~ # ectool motionsense
Motion sensing active
Sensor 0: -960 14112 -5952
Sensor 1: 453 16136 -373
Sensor 2: 0 0 0
When on its left side, report gravity along X axis:
localhost ~ # ectool motionsense
Motion sensing active
Sensor 0: 16352 -432 64
Sensor 1: 16802 -338 192
Sensor 2: 0 0 0
and check the screen rotation was normally.
Change-Id: Idbe7184d5c14eb31d7823f9e17648d9bf3df4443
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866209
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
-rw-r--r-- | board/dratini/board.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/board/dratini/board.c b/board/dratini/board.c index f6fe06cdbc..199d9bd7ec 100644 --- a/board/dratini/board.c +++ b/board/dratini/board.c @@ -182,19 +182,14 @@ static struct accelgyro_saved_data_t g_bma255_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, 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 = { + { FLOAT_TO_FP(1), 0, 0}, { 0, FLOAT_TO_FP(-1), 0}, - { FLOAT_TO_FP(-1), 0, 0}, { 0, 0, FLOAT_TO_FP(-1)} }; |