aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/peripherals
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-03-16 11:45:23 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-03-16 11:45:23 +0000
commit94bbc4d19ca17984db3262089ba7365fbf62c6de (patch)
tree5e60aebc4b1d082e721eba9516a123b09508640b /os/hal/lib/peripherals
parent1914bcbbf422a9616dd2c1d6906a8ced3548921d (diff)
downloadChibiOS-94bbc4d19ca17984db3262089ba7365fbf62c6de.tar.gz
ChibiOS-94bbc4d19ca17984db3262089ba7365fbf62c6de.tar.bz2
ChibiOS-94bbc4d19ca17984db3262089ba7365fbf62c6de.zip
Improved Gyroscope methods. Updated L3GD20 files and demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9126 35acf78f-673a-0410-8e92-d51de3d6d3f4
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)
/** @} */
/*===========================================================================*/