diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-04-24 15:09:16 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-25 05:43:58 +0000 |
commit | 70fcff4f7da0d23fb9fee33c30dc54107f8e1969 (patch) | |
tree | 5d5ad1a652f22e7e23d7413e148e7131eef40223 /board/trogdor | |
parent | 87c2d45e333909cd2d9e2b187b83ca07cf7007cc (diff) | |
download | chrome-ec-70fcff4f7da0d23fb9fee33c30dc54107f8e1969.tar.gz |
Trogdor: Fix the base g-sensor's matrix configuration
The g-sensor placement is like:
+------------------+
| |
| |
| |
| |
| |
+------------------+
/ +----+ /
/ / / /
/ / O/ / O is the pin 1 marker, which faces down.
/ +----+ /
+------------------+
The sensor's coordinate system is:
+-----> x
/|
/ |
v v
y z
The standard reference frame is:
z y
^ ^
| /
|/
+-----> x
So the matrix contributing to the standard reference frame should be:
{ { 1, 0, 0},
{ 0, -1, 0},
{ 0, 0, -1} }
Lazor and Trogdor use the same sensor placement.
BRANCH=None
BUG=b:154782446
TEST=Used 'accelinfo on' command to check the g-sensor's values.
Change-Id: I2039db3ad98af314c8d27a738153520c0b542906
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2166486
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Alexandru M Stan <amstan@chromium.org>
Diffstat (limited to 'board/trogdor')
-rw-r--r-- | board/trogdor/board.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/trogdor/board.c b/board/trogdor/board.c index bdbf4cb809..440c097069 100644 --- a/board/trogdor/board.c +++ b/board/trogdor/board.c @@ -437,9 +437,9 @@ static struct bmi_drv_data_t g_bmi160_data; /* Matrix to rotate accelerometer into standard reference frame */ const mat33_fp_t base_standard_ref = { - { FLOAT_TO_FP(-1), 0, 0}, + { FLOAT_TO_FP(1), 0, 0}, { 0, FLOAT_TO_FP(-1), 0}, - { 0, 0, FLOAT_TO_FP(1)} + { 0, 0, FLOAT_TO_FP(-1)} }; struct motion_sensor_t motion_sensors[] = { |