[imu] fix default/weak implementation of imu_periodic

should fix #972
This commit is contained in:
Felix Ruess
2014-11-20 19:07:01 +01:00
parent ed9e970a0c
commit 60c9bd16c4
2 changed files with 7 additions and 2 deletions
+4
View File
@@ -226,6 +226,10 @@ void imu_SetBodyToImuCurrent(float set) {
// weak functions, used if not explicitly provided by implementation
void WEAK imu_scale_gyro(void)
{
}
void WEAK imu_scale_gyro(struct Imu* _imu)
{
RATES_COPY(_imu->gyro_prev, _imu->gyro);
+3 -2
View File
@@ -32,9 +32,10 @@
#include "math/pprz_orientation_conversion.h"
#include "generated/airframe.h"
/* must be defined by underlying hardware */
/** must be defined by underlying hardware */
extern void imu_impl_init(void);
extern void WEAK imu_periodic(void); //Optional
/** optional. If not provided by implementation, empty function is used */
extern void imu_periodic(void);
/** abstract IMU interface providing fixed point interface */
struct Imu {