From 33bac396c61b06ab5cfd55b5f3c3d64aaff8b784 Mon Sep 17 00:00:00 2001 From: Elmo_Lan Date: Mon, 26 Mar 2018 16:55:57 +0800 Subject: [PATCH] Nami: initial x,y,z-axis direction of lid and base g-sensor Modify standard reference frame to fit Nami shell design. (base_standard_ref and lid_standard_ref) BUG=b:76392750 BRANCH=none TEST=Use "watch -n 1 ectool motionsense" to check x,y,z-axis. 1. When x-axis face up, get x value of sensor0 and sensor1 more than 10000. 2. When y-axis face up, get y value of sensor0 and sensor1 more than 10000. 3. When z-axis face up, get z value of sensor0 and sensor1 more than 10000. Change-Id: I8df24f6a48d2759938d17f8ec92b7b4536d71aaa Signed-off-by: Elmo_Lan Reviewed-on: https://chromium-review.googlesource.com/980012 Commit-Ready: Raymond Chou Tested-by: Elmo Lan Reviewed-by: Raymond Chou Reviewed-by: Daisuke Nojiri Reviewed-by: Kaiyen Chang --- board/nami/board.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/board/nami/board.c b/board/nami/board.c index a4a834d582..29ee69147a 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -542,15 +542,15 @@ static struct opt3001_drv_data_t g_opt3001_data = { }; /* Matrix to rotate accelrator into standard reference frame */ const matrix_3x3_t base_standard_ref = { - { FLOAT_TO_FP(-1), 0, 0}, - { 0, FLOAT_TO_FP(1), 0}, - { 0, 0, FLOAT_TO_FP(-1)} + { 0, FLOAT_TO_FP(-1), 0}, + { FLOAT_TO_FP(1), 0, 0}, + { 0, 0, FLOAT_TO_FP(1)} }; const matrix_3x3_t lid_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, FLOAT_TO_FP(-1), 0}, + { 0, 0, FLOAT_TO_FP(-1)} }; struct motion_sensor_t motion_sensors[] = {