diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-10-19 14:36:10 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-20 20:15:03 +0000 |
commit | 512823a8aa87d4b6a83f88bab05fe586de6c14aa (patch) | |
tree | 5be9dc89304498414d1e33e0b578e9c53b990b41 /test/online_calibration.c | |
parent | 28fe21716cdacac0ecc025407b727eaf5a99b720 (diff) | |
download | chrome-ec-512823a8aa87d4b6a83f88bab05fe586de6c14aa.tar.gz |
common: online_calibration: Fix compilation issue
- Fix compilation error: sizeof() of an input array
was not calculated properly.
- Fix calling convention: use sensor pointer instead of
sensor number
- Use common formula to calculate sensor number.
BUG=none
BRANCH=none
TEST=compile, unittest, load on eve with online calibration added.
Change-Id: I06ff30eb5710cbe8f91c939b2ccc084c20a37847
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2486304
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'test/online_calibration.c')
-rw-r--r-- | test/online_calibration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/online_calibration.c b/test/online_calibration.c index e9fff2430e..f0432d5893 100644 --- a/test/online_calibration.c +++ b/test/online_calibration.c @@ -210,7 +210,7 @@ static int test_new_calibration_value(void) TEST_EQ(rc, EC_SUCCESS, "%d"); TEST_EQ(online_calibration_has_new_values(), true, "%d"); - rc = online_calibration_read(BASE, cal_data.data); + rc = online_calibration_read(&motion_sensors[BASE], &cal_data); TEST_EQ(rc, true, "%d"); TEST_EQ(cal_data.data[X], 81, "%d"); TEST_EQ(cal_data.data[Y], -163, "%d"); |