Merge pull request #7313 from mikeller/simplify_gyro_analyse

Simplified conditionals for using gyro data analysis.
This commit is contained in:
Michael Keller 2019-01-08 00:28:17 +13:00 committed by GitHub
commit 3cbd55e3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -51,7 +51,7 @@
#include "sensors/boardalignment.h"
#include "sensors/gyro.h"
#include "sensors/sensors.h"
#if (!defined(SIMULATOR_BUILD) && !defined(UNIT_TEST))
#if defined(USE_GYRO_DATA_ANALYSE)
#include "sensors/gyroanalyse.h"
#endif
#include "fc/config.h"
@ -439,7 +439,7 @@ void tryArm(void)
}
imuQuaternionHeadfreeOffsetSet();
#if (!defined(SIMULATOR_BUILD) && !defined(UNIT_TEST) && defined(USE_GYRO_DATA_ANALYSE))
#if defined(USE_GYRO_DATA_ANALYSE)
resetMaxFFT();
#endif

View File

@ -95,7 +95,7 @@
#include "sensors/battery.h"
#include "sensors/esc_sensor.h"
#include "sensors/sensors.h"
#if (!defined(SIMULATOR_BUILD) && !defined(UNIT_TEST) && defined(USE_GYRO_DATA_ANALYSE))
#if defined(USE_GYRO_DATA_ANALYSE)
#include "sensors/gyroanalyse.h"
#endif
@ -1824,7 +1824,7 @@ static void osdShowStats(uint16_t endBatteryVoltage)
}
#endif
#if (!defined(SIMULATOR_BUILD) && !defined(UNIT_TEST) && defined(USE_GYRO_DATA_ANALYSE))
#if defined(USE_GYRO_DATA_ANALYSE)
if (osdStatGetState(OSD_STAT_MAX_FFT) && featureIsEnabled(FEATURE_DYNAMIC_FILTER)) {
int value = getMaxFFT();
if (value > 0) {

View File

@ -233,3 +233,8 @@
#if defined(USE_SERIAL_4WAY_SK_BOOTLOADER) && !defined(USE_SERIAL_4WAY_BLHELI_BOOTLOADER)
#define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
#endif
#if defined(SIMULATOR_BUILD) || defined(UNIT_TEST)
// This feature uses 'arm_math.h', which does not exist for x86.
#undef USE_GYRO_DATA_ANALYSE
#endif