diff options
author | Sue Chen <sue.chen@quanta.corp-partner.google.com> | 2020-12-16 14:24:52 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-16 12:40:50 +0000 |
commit | ca948d79a7030df97b8f4fea16292b60fa60fd03 (patch) | |
tree | cdde90888d34b6a06a374e9e9788275762c25ecc | |
parent | 638a18af5e898e7b84a3e5c8db62c0e5226a3c3f (diff) | |
download | chrome-ec-ca948d79a7030df97b8f4fea16292b60fa60fd03.tar.gz |
ezkinil: fix ICM40608 orientation of x and y axes
For the definition of orientation is different between BMI160
and ICM40608 so add base_standard_ref_1 for ICM40608.
BUG=b:175169469
BRANCH=zork
TEST="ectool motionsense" shows correct Senser 1 data.
Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com>
Change-Id: I81716bf44f80f7939cce2a8501a3b52a0295cc05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2594729
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | board/ezkinil/board.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c index 2db679ada4..20d1723043 100644 --- a/board/ezkinil/board.c +++ b/board/ezkinil/board.c @@ -60,6 +60,11 @@ const mat33_fp_t base_standard_ref = { { FLOAT_TO_FP(-1), 0, 0}, { 0, 0, FLOAT_TO_FP(-1)} }; +const mat33_fp_t base_standard_ref_1 = { + { FLOAT_TO_FP(1), 0, 0}, + { 0, FLOAT_TO_FP(-1), 0}, + { 0, 0, FLOAT_TO_FP(-1)} +}; const mat33_fp_t lid_standard_ref = { { FLOAT_TO_FP(-1), 0, 0}, { 0, FLOAT_TO_FP(-1), 0}, @@ -156,7 +161,7 @@ struct motion_sensor_t icm426xx_base_accel = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = ICM426XX_ADDR0_FLAGS, .default_range = 2, /* g, enough for laptop */ - .rot_standard_ref = &base_standard_ref, + .rot_standard_ref = &base_standard_ref_1, .min_frequency = ICM426XX_ACCEL_MIN_FREQ, .max_frequency = ICM426XX_ACCEL_MAX_FREQ, .config = { @@ -184,7 +189,7 @@ struct motion_sensor_t icm426xx_base_gyro = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = ICM426XX_ADDR0_FLAGS, .default_range = 1000, /* dps */ - .rot_standard_ref = &base_standard_ref, + .rot_standard_ref = &base_standard_ref_1, .min_frequency = ICM426XX_GYRO_MIN_FREQ, .max_frequency = ICM426XX_GYRO_MAX_FREQ, }; |