diff options
author | Devin Lu <devin.lu@quantatw.com> | 2019-04-16 14:18:08 +0800 |
---|---|---|
committer | Justin TerAvest <teravest@chromium.org> | 2019-04-18 15:37:17 +0000 |
commit | f194cdcce858682bc4328e01475db8d6e37e0de0 (patch) | |
tree | f6f627960ce55dabbade71fd02c9a855c58704cc | |
parent | 81464c37bd43944ebc1bc5a73d03fa306637025c (diff) | |
download | chrome-ec-f194cdcce858682bc4328e01475db8d6e37e0de0.tar.gz |
bloog: correct accelerometer orientation
Correct accelerometer orientation, because differece from meep.
BUG=b:130619474
BRANCH=octopus
TEST=When device is laying on a table, lid angle at 180, both sensors
report gravity along Z axis:
ectool motionsense
Motion sensing active
Sensor 0: 507 606 16748
Sensor 1: 17 -334 16442
Sensor 2: 0 0 0
Sensor 3: 0 0 0
When on the base bottom edge, report gravity along Y axis:
ectool motionsense
Motion sensing active
Sensor 0: 403 16491 655
Sensor 1: 19 16163 1540
Sensor 2: 0 0 0
Sensor 3: 0 0 0
When on its left side, report gravity along X axis:
ectool motionsense
Motion sensing active
Sensor 0: 16172 -374 1738
Sensor 1: 16315 -184 1280
Sensor 2: 0 0 0
Sensor 3: 0 0 0
and check the screen rotation was normally.
Change-Id: I20ceab05ac9dce2cba09417a759d6657a185788d
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1569087
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Marco Chen <marcochen@chromium.org>
Commit-Queue: Marco Chen <marcochen@chromium.org>
-rw-r--r-- | board/bloog/board.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/bloog/board.c b/board/bloog/board.c index ea8b246e89..73bec21045 100644 --- a/board/bloog/board.c +++ b/board/bloog/board.c @@ -111,15 +111,15 @@ static struct mutex g_base_mutex; /* Matrix to rotate accelrator into standard reference frame */ const mat33_fp_t lid_standrd_ref = { - { FLOAT_TO_FP(1), 0, 0}, - { 0, FLOAT_TO_FP(-1), 0}, + { FLOAT_TO_FP(-1), 0, 0}, + { 0, FLOAT_TO_FP(1), 0}, { 0, 0, FLOAT_TO_FP(-1)} }; const mat33_fp_t base_standard_ref = { - { FLOAT_TO_FP(1), 0, 0}, + { FLOAT_TO_FP(-1), 0, 0}, { 0, FLOAT_TO_FP(-1), 0}, - { 0, 0, FLOAT_TO_FP(-1)} + { 0, 0, FLOAT_TO_FP(1)} }; /* sensor private data */ |