only check and use aligner if USE_AHRS_ALIGNER is defined

This commit is contained in:
Felix Ruess
2011-10-31 18:45:01 +01:00
parent 0bdd36a118
commit ce82f6330b
@@ -681,6 +681,7 @@ static inline void on_gyro_event( void ) {
LED_ON(AHRS_CPU_LED);
#endif
#ifdef USE_AHRS_ALIGNER
// Run aligner on raw data as it also makes averages.
if (ahrs.status == AHRS_UNINIT) {
ImuScaleGyro(imu);
@@ -690,6 +691,7 @@ static inline void on_gyro_event( void ) {
ahrs_align();
return;
}
#endif
#if PERIODIC_FREQUENCY == 60
ImuScaleGyro(imu);