diff options
author | Yuval Peress <peress@chromium.org> | 2020-03-09 11:59:52 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-14 02:33:37 +0000 |
commit | 13d9ff85b01bf69c78e4e3623797b4c1f5c56ffa (patch) | |
tree | 448d5b0b758cf594363ff24e6ca5d5ba7dbb94f1 /include/mag_cal.h | |
parent | bc66c458cf35a122f4f50e111be834e69410d996 (diff) | |
download | chrome-ec-13d9ff85b01bf69c78e4e3623797b4c1f5c56ffa.tar.gz |
common: online_calibration: Add support for magnetometer
Add support for magnetometers in online calibration.
BRANCH=None
BUG=b:138303797,chromium:1023858
TEST=Added new unit test
Change-Id: I3a6dafb2f5fab9b11ac8bd3b53ae4976002d18cd
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2095519
Diffstat (limited to 'include/mag_cal.h')
-rw-r--r-- | include/mag_cal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mag_cal.h b/include/mag_cal.h index a730fcbe59..61b24c7da9 100644 --- a/include/mag_cal.h +++ b/include/mag_cal.h @@ -29,5 +29,13 @@ struct mag_cal_t { void init_mag_cal(struct mag_cal_t *moc); +/** + * Update the magnetometer calibration structure and possibly compute the new + * bias. + * + * @param moc Pointer to the magnetometer struct to update. + * @param v The new data. + * @return 1 if a new calibration value is available, 0 otherwise. + */ int mag_cal_update(struct mag_cal_t *moc, const intv3_t v); #endif /* __CROS_EC_MAG_CAL_H */ |