1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Simplified conditionals for using gyro data analysis.

This commit is contained in:
mikeller 2018-12-30 01:31:06 +13:00
parent a6fabe11a1
commit e4383b5a36
3 changed files with 9 additions and 4 deletions

View file

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

View file

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

View file

@ -233,3 +233,8 @@
#if defined(USE_SERIAL_4WAY_SK_BOOTLOADER) && !defined(USE_SERIAL_4WAY_BLHELI_BOOTLOADER) #if defined(USE_SERIAL_4WAY_SK_BOOTLOADER) && !defined(USE_SERIAL_4WAY_BLHELI_BOOTLOADER)
#define USE_SERIAL_4WAY_BLHELI_BOOTLOADER #define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
#endif #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