Merge pull request #7313 from mikeller/simplify_gyro_analyse
Simplified conditionals for using gyro data analysis.
This commit is contained in:
commit
3cbd55e3e8
|
@ -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
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue