summaryrefslogtreecommitdiff
path: root/board/metaknight
diff options
context:
space:
mode:
authorYu-An Chen <yu-an.chen@quanta.corp-partner.google.com>2020-11-23 15:36:52 +0800
committerCommit Bot <commit-bot@chromium.org>2020-11-23 18:08:59 +0000
commit430d933f4c2fa49d692bd1eb4b48d7b287b87b97 (patch)
tree5744c69dc6e950c5cfd8f2948c871f08542c77b0 /board/metaknight
parentc56cabb55a3c907bae1c400c352b85dc41d15db5 (diff)
downloadchrome-ec-430d933f4c2fa49d692bd1eb4b48d7b287b87b97.tar.gz
Metaknight: Modify motion sensor rotation matrices
Change rotations matrices of accel sensor BUG=b:173984659 BRANCH=master TEST=make BOARD=metaknight TEST=Using ectool 'motionsense' verified lid angle now goes from 0 to 360 and swtiches to tablet mode after crossing 200 threshold. Signed-off-by: yu-an.chen@quanta.corp-partner.google.com Change-Id: I3aa6857d5d152296e2bc35a6ffc073b6fa7b7db6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2553949 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/metaknight')
-rw-r--r--board/metaknight/board.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/metaknight/board.c b/board/metaknight/board.c
index 45496c2992..2910c366ed 100644
--- a/board/metaknight/board.c
+++ b/board/metaknight/board.c
@@ -359,15 +359,15 @@ static struct mutex g_base_mutex;
/* Matrices to rotate accelerometers into the standard reference. */
static const mat33_fp_t lid_standard_ref = {
- { 0, FLOAT_TO_FP(1), 0},
{ FLOAT_TO_FP(-1), 0, 0},
+ { 0, FLOAT_TO_FP(-1), 0},
{ 0, 0, FLOAT_TO_FP(1)}
};
static const mat33_fp_t base_standard_ref = {
- { 0, FLOAT_TO_FP(1), 0},
- { FLOAT_TO_FP(-1), 0, 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)}
};
static struct accelgyro_saved_data_t g_bma253_data;