summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2019-12-06 10:00:39 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-09 04:43:48 +0000
commit8260bc9ebe7d32fe8154af0447f67d64b0499031 (patch)
treebad297b02a2cb846bcaa45c2a98a7bcecb9a4cd0
parentc3c55b71261ca9ac43e6df5e05cb3a3fcd47efee (diff)
downloadchrome-ec-8260bc9ebe7d32fe8154af0447f67d64b0499031.tar.gz
jinlon: correct accel orientation
BUG=none BRANCH=hatch 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: -816 1904 16144 Sensor 1: 115 -136 16228 Sensor 2: 0 0 0 When on the base bottom edge, report gravity along Y axis: localhost ~ # ectool motionsense Motion sensing active Sensor 0: -3344 16160 -1616 Sensor 1: 5 16381 1029 Sensor 2: 0 0 0 When on its left side, report gravity along X axis: localhost ~ # ectool motionsense Motion sensing active Sensor 0: 16416 4272 -1280 Sensor 1: 16403 627 -1691 Sensor 2: 0 0 0 and check the screen rotation was normally. Change-Id: Ie9afa76954c6fd4e5996809255df203688953440 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1955104 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
-rw-r--r--board/jinlon/board.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/jinlon/board.c b/board/jinlon/board.c
index 4df25350a9..b735dfd554 100644
--- a/board/jinlon/board.c
+++ b/board/jinlon/board.c
@@ -183,15 +183,15 @@ 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 = {
- { FLOAT_TO_FP(-1), 0, 0},
{ 0, FLOAT_TO_FP(-1), 0},
- { 0, 0, FLOAT_TO_FP(1)}
+ { FLOAT_TO_FP(-1), 0, 0},
+ { 0, 0, FLOAT_TO_FP(-1)}
};
static const mat33_fp_t lid_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)}
};
struct motion_sensor_t motion_sensors[] = {