From 5717b3150c8a8d43e07ce2dc8065c3515d3651f7 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Thu, 17 Sep 2015 11:42:43 -0700 Subject: motion: add config option to use the old accelerometer ref frame Add config option to use the old accelerometer reference frame, which is used on samus and products using 3.14 or earlier kernel. This fixes samus so that the lid angle calculation is correct again. This also moves the accel_orientation structure out of the board directory and into common code, since it purely is a function of the reference frame being used. BUG=chrome-os-partner:43494 BRANCH=none TEST=test on samus, verify lid angle calculation is correct once again. also, enable the motion_lid test and verify that it passes. Change-Id: I948a74a71964b54c68be66e828a030ddd0418947 Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/300510 Tested-by: Aseda Aboagye Reviewed-by: Gwendal Grignou --- board/host/board.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'board/host') diff --git a/board/host/board.c b/board/host/board.c index c101ad08f8..408bfdcf0b 100644 --- a/board/host/board.c +++ b/board/host/board.c @@ -55,22 +55,6 @@ const struct button_config buttons[] = { BUILD_ASSERT(ARRAY_SIZE(buttons) == CONFIG_BUTTON_COUNT); #endif -/* Define the accelerometer orientation matrices. */ -const struct accel_orientation acc_orient = { - /* Hinge aligns with y axis. */ - .rot_hinge_90 = { - { 0, 0, 1}, - { 0, 1, 0}, - { -1, 0, 0} - }, - .rot_hinge_180 = { - {-1, 0, 0}, - { 0, 1, 0}, - { 0, 0, -1} - }, - .hinge_axis = {0, 1, 0}, -}; - #ifdef CONFIG_I2C /* I2C ports */ const struct i2c_port_t i2c_ports[] = { -- cgit v1.2.1