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:
parent
a6fabe11a1
commit
e4383b5a36
3 changed files with 9 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue