From 641f73185f59fe6152fdfa41b04d265eace7f23f Mon Sep 17 00:00:00 2001 From: Ege Mihmanli Date: Thu, 11 Jan 2018 15:36:48 -0800 Subject: [PATCH] board: rainier: fix accel orientation Rainier has landscape orientation, therefore needs its accelerometer base values adjusted. BUG=b:71753415 TEST=Rotate rainier and make sure screen orientation is not off by 90 degrees. BRANCH=None Signed-off-by: Ege Mihmanli Change-Id: I60b49e717c691e34a39e817d2c064ea45b8d53d7 Reviewed-on: https://chromium-review.googlesource.com/862733 Reviewed-by: Shawn N --- board/rainier/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/rainier/board.c b/board/rainier/board.c index 89c7490356..c827241eec 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -352,8 +352,8 @@ static struct bmi160_drv_data_t g_bmi160_data; /* Matrix to rotate accelerometer into standard reference frame */ const matrix_3x3_t base_standard_ref = { - { FLOAT_TO_FP(-1), 0, 0}, - { 0, FLOAT_TO_FP(-1), 0}, + { 0, FLOAT_TO_FP(-1), 0}, + { FLOAT_TO_FP(1), 0, 0}, { 0, 0, FLOAT_TO_FP(1)} };