From 3e5db62724c717b35b182065428d5bbb41a352e9 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Fri, 1 Dec 2017 16:36:55 -0800 Subject: [PATCH] board: Set BM160 Accel and Gyro to identical matrix. Accel and Gyro is in the same chip, so the .rot_standard_ref field of their sensor structure should be the same. BUG=b:70042791 TEST=Compile BRANCH=oak Change-Id: I24b5971912b0cd5afc073d1e150cb3186803be04 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/804948 Commit-Ready: Alexandru M Stan Tested-by: Alexandru M Stan Reviewed-by: Alexandru M Stan --- board/nefario/board.c | 2 +- board/oak/board.c | 2 +- board/rainier/board.c | 2 +- board/scarlet/board.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/board/nefario/board.c b/board/nefario/board.c index 71c53e2e0e..547aa30d8c 100644 --- a/board/nefario/board.c +++ b/board/nefario/board.c @@ -448,7 +448,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .default_range = 1000, /* dps */ - .rot_standard_ref = NULL, /* Identity matrix. */ + .rot_standard_ref = &base_standard_ref, .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { diff --git a/board/oak/board.c b/board/oak/board.c index 03a3222127..5d50a0be0b 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -672,7 +672,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = 1, .default_range = 1000, /* dps */ - .rot_standard_ref = NULL, /* Identity Matrix. */ + .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, .config = { diff --git a/board/rainier/board.c b/board/rainier/board.c index b8c8627983..09b3ee1358 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -421,7 +421,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .default_range = 1000, /* dps */ - .rot_standard_ref = NULL, /* Identity matrix. */ + .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, .config = { diff --git a/board/scarlet/board.c b/board/scarlet/board.c index 5a9e7db8ee..7a796bc8a9 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -415,7 +415,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .default_range = 1000, /* dps */ - .rot_standard_ref = NULL, /* Identity matrix. */ + .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, .config = {