summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Cheng <kevin.cheng@intel.com>2015-09-15 14:37:53 +0800
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2015-09-16 02:04:47 +0000
commitc9b7ffb5938a660ba36f0c67725032b3f05a42dd (patch)
treeaf59c7b58eb3bbb19364c8d52c6b4e7d46b55998
parent3f380bc6ee898a9cf3856289e1887ab80c491f61 (diff)
downloadchrome-ec-c9b7ffb5938a660ba36f0c67725032b3f05a42dd.tar.gz
strago: fix sensors matrices
Matches definitons set in chromium/chromeos/accelerometer/accelerometer_types.h. Using that standard, the coordinate frames of the lid and base DO NOT line up perfectly when the lid is fully closed or fully open. Therefore, rotate the lid vector 180 along the X axis before calculating the lid angle. BRANCH=strago BUG=none TEST=When the device is open 180 degrees, check the sensors agree with each other: Flat on the back (Z pointing to the sky): localhost devices # cat */*raw -1008 [keyboard : X] -112 [keyboard : Y] 16544 [kyeboard : Z] -256 [lid : X ] 2000 [lid : Y ] 16336 [lid : Z ] On the right side (X pointing to the ground) localhost devices # cat */*raw -16928 -48 -1040 -16176 432 80 On the bottom edge (Y pointing to the sky) localhost devices # cat */*raw -192 15872 1648 496 15936 752 Check the angle as calculated by the EC is correct using accelinfo. Change-Id: I620b0078863137bc244aeacb6d8a81a9c869211a Signed-off-by: Kevin Cheng <kevin.cheng@intel.com> Reviewed-on: https://chromium-review.googlesource.com/299577 Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/strago/board.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/strago/board.c b/board/strago/board.c
index 42ec939e28..b354b1a75f 100644
--- a/board/strago/board.c
+++ b/board/strago/board.c
@@ -127,9 +127,9 @@ const matrix_3x3_t base_standard_ref = {
};
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[] = {