From 400ea24bb0d0103f04749a5508de755ce544f467 Mon Sep 17 00:00:00 2001 From: Wai-Hong Tam Date: Thu, 14 May 2020 09:54:23 -0700 Subject: Lazor: Correct the lid g-sensor's matrix configuration The lid g-sensor placement is like: +------------------+ | | | +----+ | | | | | | |O | | O is the pin 1 marker, | +----+ | which faces to the user. +------------------+ / / / / / / / / +------------------+ The sensor's coordinate system is: x <-----+ /| / | v v z y The standard reference frame is: y ^ | | +-----> x / / v z So the matrix contributing to the standard reference frame should be: { { -1, 0, 0}, { 0, -1, 0}, { 0, 0, 1} } BRANCH=None BUG=b:155853349 TEST=Used 'accelinfo on' command to check the g-sensor's values. Change-Id: I98aa49665659374d0fda0d8a3c7622ec5f9a27bc Signed-off-by: Wai-Hong Tam Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2202164 Reviewed-by: Alexandru M Stan --- board/lazor/board.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/lazor') diff --git a/board/lazor/board.c b/board/lazor/board.c index 71d07b1c62..f22ec13871 100644 --- a/board/lazor/board.c +++ b/board/lazor/board.c @@ -430,9 +430,9 @@ const mat33_fp_t base_standard_ref = { }; static const mat33_fp_t lid_standard_ref = { - { 0, FLOAT_TO_FP(1), 0}, - { FLOAT_TO_FP(1), 0, 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[] = { -- cgit v1.2.1