mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-15 00:56:22 +00:00
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:
@@ -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[] = {
|
||||
|
||||
Reference in New Issue
Block a user