From 9b420804d88a7adf8a1ded8bd12e52e1aa8ddd84 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Mon, 17 Mar 2014 15:43:57 -0700 Subject: [PATCH] accel: glimmer: Fixed sign of accel z-axis The accelerometer calibration routine came up with the wrong sign for the z-axis. Fixed that bug and flipped the sign for glimmer in the standard reference frame rotation matrix. BUG=none BRANCH=rambi TEST=Tested on a glimmer. Ran calibration routine and then verified that if the unit is sitting flat on a table with lid open to 90, the accelometer data send to host should read: base = 0, 0, 1024 lid = -1024, 0, 0 When the laptop is closed and flipped over, the data should read: base = 0, 0, -1024 lid = 0, 0, -1024 Change-Id: I1e8bcda26c16496d9cb49dece12db0c4ea929ece Original-Change-Id: If3bb7a095e400f5a247fab64b0050a44f4947e6c Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/190400 Reviewed-by: Dave Parker Reviewed-on: https://chromium-review.googlesource.com/191579 Reviewed-by: Randall Spangler --- common/motion_calibrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/motion_calibrate.c b/common/motion_calibrate.c index af237591dd..9819f12d28 100644 --- a/common/motion_calibrate.c +++ b/common/motion_calibrate.c @@ -30,7 +30,7 @@ static matrix_3x3_t standard_ref_calib = { { 1024, 0, 0}, { 0, -1024, 0}, - { 0, 0, -1024} + { 0, 0, 1024} }; /*****************************************************************************/