summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-09-23 09:47:32 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-23 22:24:37 +0000
commit45abc9fa62fb8fe015d27c3e27c8fdddd351e338 (patch)
tree5d95777303b9d09f09047b0ff810bcfcc1f18701
parentdbfe5d10efee3883637f9eb3f4dd0eda59eefc93 (diff)
downloadchrome-ec-45abc9fa62fb8fe015d27c3e27c8fdddd351e338.tar.gz
samus: accel: fix calibration bug, only using base sensor data
Fix accel calibration bug from refactoring. The motion_get_accel_lid() function used by calibrate routine to get lid accel data was actually returning base accel data. BUG=none BRANCH=none TEST=load onto samus, run accel calibration routine. Change-Id: I095381390267aa6ea3b3a74311c27f30d70e9c81 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219520 Reviewed-by: Sheng-liang Song <ssl@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
-rw-r--r--common/motion_sense.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 18aa5aa45e..62be9ad181 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -164,7 +164,7 @@ void motion_get_accel_lid(vector_3_t *v, int adjusted)
struct motion_sensor_t *accel_lid = NULL;
for (i = 0; i < motion_sensor_count; ++i) {
sensor = &motion_sensors[i];
- if ((LOCATION_BASE == sensor->location)
+ if ((LOCATION_LID == sensor->location)
&& (SENSOR_ACCELEROMETER == sensor->type)) {
accel_lid = sensor;
break;