From 45abc9fa62fb8fe015d27c3e27c8fdddd351e338 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Tue, 23 Sep 2014 09:47:32 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/219520 Reviewed-by: Sheng-liang Song Reviewed-by: Gwendal Grignou --- common/motion_sense.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;