aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/peripherals
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/lib/peripherals')
-rw-r--r--os/hal/lib/peripherals/sensors/hal_gyroscope.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/os/hal/lib/peripherals/sensors/hal_gyroscope.h b/os/hal/lib/peripherals/sensors/hal_gyroscope.h
index ac2901fe4..e61d06b0f 100644
--- a/os/hal/lib/peripherals/sensors/hal_gyroscope.h
+++ b/os/hal/lib/peripherals/sensors/hal_gyroscope.h
@@ -47,10 +47,10 @@
* @brief BaseGyroscope specific methods.
*/
#define _base_gyroscope_methods_alone \
- /* Remove the calibration data.*/ \
- msg_t (*reset_calibration)(void *instance); \
- /* Invokes the calibration procedure.*/ \
- msg_t (*calibrate)(void *instance);
+ /* Invoke the sample bias procedure.*/ \
+ msg_t (*sample_bias)(void *instance); \
+ /* Remove bias stored data.*/ \
+ msg_t (*reset_bias)(void *instance);
/**
* @brief BaseGyroscope specific methods with inherited ones.
@@ -132,7 +132,10 @@ typedef struct {
(ip)->vmt_basegyroscope->read_cooked(ip, dp)
/**
- * @brief Delete calibration data.
+ * @brief Gyroscope bias sampling procedure.
+ * @note During this procedure gyroscope must be kept hold in the rest
+ * position. Sampled bias will be automatically removed after calling
+ * this procedure.
*
* @param[in] ip pointer to a @p BaseGyroscope class.
*
@@ -142,11 +145,11 @@ typedef struct {
*
* @api
*/
-#define gyroscopeResetCalibration(ip) \
- (ip)->vmt_basegyroscope->reset_calibration(ip)
+#define gyroscopeSampleBias(ip) \
+ (ip)->vmt_basegyroscope->sample_bias(ip)
/**
- * @brief Gyroscope calibration procedure.
+ * @brief Reset bias data restoring it to zero.
*
* @param[in] ip pointer to a @p BaseGyroscope class.
*
@@ -156,8 +159,8 @@ typedef struct {
*
* @api
*/
-#define gyroscopeCalibrate(ip) \
- (ip)->vmt_basegyroscope->calibrate(ip)
+#define gyroscopeResetCalibration(ip) \
+ (ip)->vmt_basegyroscope->reset_bias(ip)
/** @} */
/*===========================================================================*/