mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
reef: Add matrix for lid accelerometer.
No matrix was set, the reported data by the accelerometer was not in the proper referential. BUG=chrome-os-partner:58792 BRANCH=none TEST=with ectool motionsense, check the data matches the standard. Change-Id: I25aa3a1774ba80f1a0f8a41adc976af832436c63 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/411358 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
bd60328a6e
commit
430dd5e644
@@ -734,6 +734,12 @@ static struct mutex g_lid_mutex;
|
||||
static struct mutex g_base_mutex;
|
||||
|
||||
/* Matrix to rotate accelrator into standard reference frame */
|
||||
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)}
|
||||
};
|
||||
|
||||
const matrix_3x3_t base_standard_ref = {
|
||||
{ 0, FLOAT_TO_FP(-1), 0},
|
||||
{ FLOAT_TO_FP(1), 0, 0},
|
||||
@@ -762,7 +768,7 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
.drv_data = &g_kx022_data,
|
||||
.port = I2C_PORT_LID_ACCEL,
|
||||
.addr = KX022_ADDR1,
|
||||
.rot_standard_ref = NULL, /* Identity matrix. */
|
||||
.rot_standard_ref = &lid_standard_ref,
|
||||
.default_range = 2, /* g, enough for laptop. */
|
||||
.config = {
|
||||
/* AP: by default use EC settings */
|
||||
|
||||
Reference in New Issue
Block a user