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>
This commit is contained in:
Alec Berg
2014-09-23 09:47:32 -07:00
committed by chrome-internal-fetch
parent dbfe5d10ef
commit 45abc9fa62

View File

@@ -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;