Nami: initial x,y,z-axis direction of lid and base g-sensor

Modify standard reference frame to fit Nami shell design.
(base_standard_ref and lid_standard_ref)

BUG=b:76392750
BRANCH=none
TEST=Use "watch -n 1 ectool motionsense" to check x,y,z-axis.
1. When x-axis face up, get x value of sensor0 and sensor1 more than 10000.
2. When y-axis face up, get y value of sensor0 and sensor1 more than 10000.
3. When z-axis face up, get z value of sensor0 and sensor1 more than 10000.

Change-Id: I8df24f6a48d2759938d17f8ec92b7b4536d71aaa
Signed-off-by: Elmo_Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/980012
Commit-Ready: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Tested-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Kaiyen Chang <kaiyen.chang@intel.com>
This commit is contained in:
Elmo_Lan
2018-03-26 16:55:57 +08:00
committed by chrome-bot
parent 67ee456782
commit 33bac396c6

View File

@@ -542,15 +542,15 @@ static struct opt3001_drv_data_t g_opt3001_data = {
};
/* Matrix to rotate accelrator into standard reference frame */
const matrix_3x3_t base_standard_ref = {
{ FLOAT_TO_FP(-1), 0, 0},
{ 0, FLOAT_TO_FP(1), 0},
{ 0, 0, FLOAT_TO_FP(-1)}
{ 0, FLOAT_TO_FP(-1), 0},
{ FLOAT_TO_FP(1), 0, 0},
{ 0, 0, FLOAT_TO_FP(1)}
};
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)}
{ FLOAT_TO_FP(1), 0, 0},
{ 0, FLOAT_TO_FP(-1), 0},
{ 0, 0, FLOAT_TO_FP(-1)}
};
struct motion_sensor_t motion_sensors[] = {