summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-03-17 15:43:57 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-03-18 00:27:21 +0000
commitba3f7b2db1dabea06e58a97ed12484d04e789e4f (patch)
tree4ea0105f477f71b5639b07bde4ad59626a81d862
parente60dfac6cb716f27fe26d300a75f2d034c4c4f3c (diff)
downloadchrome-ec-ba3f7b2db1dabea06e58a97ed12484d04e789e4f.tar.gz
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: If3bb7a095e400f5a247fab64b0050a44f4947e6c Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/190400 Reviewed-by: Dave Parker <dparker@chromium.org>
-rw-r--r--board/glimmer/board.c2
-rw-r--r--common/motion_calibrate.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/board/glimmer/board.c b/board/glimmer/board.c
index 18ded261cd..9b7a723a8e 100644
--- a/board/glimmer/board.c
+++ b/board/glimmer/board.c
@@ -299,7 +299,7 @@ struct accel_orientation acc_orient = {
.rot_standard_ref = {
{ 0, 1, 0},
{-1, 0, 0},
- { 0, 0, 1}
+ { 0, 0, -1}
},
.hinge_axis = {1, 0, 0},
};
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}
};
/*****************************************************************************/