diff options
author | Sheng-Liang Song <ssl@chromium.org> | 2014-08-13 14:17:07 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-08-26 03:05:55 +0000 |
commit | 7d40063d46aa9a8b6146355ee9be9db775af7f0d (patch) | |
tree | aed9ecdc51ff99d1dcb9b259e6727577986d2be6 /include/math_util.h | |
parent | c598e1ac06c4ceddf28399081ed669eaaa533ae9 (diff) | |
download | chrome-ec-7d40063d46aa9a8b6146355ee9be9db775af7f0d.tar.gz |
samus: added gyro support for lsm6ds0
Changed motion_sense task to assume sensors are unpowered in G3
and re-initialize sensors every time coming out of G3.
Added EC command line test utils as well.
Fixed some bug during unit tests.
BUG=chrome-os-partner:27313,27320
BRANCH=ToT
TEST=Verified on Samus.
Tested with accel EC CLIs
accelread, accelrange, accelrate, accelres
Tested accelcalib, a ACCEL calibration util, and it succeeded.
Tested sysfs interface:
cd /sys/bus/iio/devices/iio:device1
cat in_accel_*_gyro_raw
Signed-off-by: Sheng-Liang Song <ssl@chromium.org>
Change-Id: I5752b00c03e1942c790ea4f28610fda83fa2dcbc
Reviewed-on: https://chromium-review.googlesource.com/211484
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/math_util.h')
-rw-r--r-- | include/math_util.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/math_util.h b/include/math_util.h index ffdbec424b..1dc92c4999 100644 --- a/include/math_util.h +++ b/include/math_util.h @@ -40,11 +40,11 @@ float cosine_of_angle_diff(const vector_3_t v1, const vector_3_t v2); * Rotate vector v by rotation matrix R. * * @param v Vector to be rotated. - * @param R Pointer to rotation matrix. - * @param res Pointer to the resultant vector. + * @param R Rotation matrix. + * @param res Resultant vector. */ -void rotate(const vector_3_t v, const matrix_3x3_t (* const R), - vector_3_t *res); +void rotate(const vector_3_t v, const matrix_3x3_t R, + vector_3_t res); #ifdef CONFIG_ACCEL_CALIBRATE |