diff options
author | Devin Lu <devin.lu@quantatw.com> | 2019-04-16 14:18:08 +0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2019-04-19 05:17:33 +0000 |
commit | d20da59f1e5e52e49b858ef1d1d706342753853d (patch) | |
tree | 4d03ca3375afb8a3105cd227d42747e51c0a7f86 | |
parent | cb20b069826bc717c8ba45e5ae442ad229862a58 (diff) | |
download | chrome-ec-d20da59f1e5e52e49b858ef1d1d706342753853d.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>
(cherry picked from commit f194cdcce858682bc4328e01475db8d6e37e0de0)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1575045
Tested-by: Justin TerAvest <teravest@chromium.org>
Commit-Queue: Justin TerAvest <teravest@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 */ |