1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +03:00

Prepend USE_ prefix to CPP directives for enabling features

Prepended to: 'ACC', 'GYRO', 'BARO', 'MAG', 'LED_STRIP',
'SPEKTRUM_BIND', 'SERIAL_RX', 'BLACKBOX', 'GPS', 'GPS_PROTO_UBLOX',
'TELEMETRY', 'TELEMETRY_LTM', 'TELEMETRY_FRSKY', 'CMS',
'GPS_PROTO_NMEA', 'GPS_PROTO_I2C_NAV', 'GPS_PROTO_NAZA',
'GPS_PROTO_UBLOX_NEO7PLUS', 'GPS_PROTO_MTK', 'TELEMETRY_HOTT',
'TELEMETRY_IBUS', 'TELEMETRY_MAVLINK', 'TELEMETRY_SMARTPORT',
'TELEMETRY_CRSF', 'PWM_DRIVER_PCA9685', 'PITOT', 'OSD',
This commit is contained in:
Alberto García Hierro 2017-12-03 20:54:49 +00:00
parent a5bee479be
commit 7a1491e158
124 changed files with 681 additions and 681 deletions

View file

@ -184,7 +184,7 @@ static float invSqrt(float x)
return 1.0f / sqrtf(x);
}
#if defined(GPS) || defined(HIL)
#if defined(USE_GPS) || defined(HIL)
STATIC_UNIT_TESTED void imuComputeQuaternionFromRPY(int16_t initialRoll, int16_t initialPitch, int16_t initialYaw)
{
if (initialRoll > 1800) initialRoll -= 3600;
@ -253,7 +253,7 @@ static void imuCheckAndResetOrientationQuaternion(const float ax, const float ay
if (isNan || isZero || isInf) {
imuResetOrientationQuaternion(ax, ay, az);
#ifdef BLACKBOX
#ifdef USE_BLACKBOX
if (feature(FEATURE_BLACKBOX)) {
blackboxLogEvent(FLIGHT_LOG_EVENT_IMU_FAILURE, NULL);
}
@ -444,7 +444,7 @@ static bool imuCanUseAccelerometerForCorrection(void)
static void imuCalculateEstimatedAttitude(float dT)
{
#if defined(MAG)
#if defined(USE_MAG)
const bool canUseMAG = sensors(SENSOR_MAG) && compassIsHealthy();
#else
const bool canUseMAG = false;
@ -456,7 +456,7 @@ static void imuCalculateEstimatedAttitude(float dT)
bool useMag = false;
bool useCOG = false;
#if defined(GPS)
#if defined(USE_GPS)
if (STATE(FIXED_WING)) {
bool canUseCOG = sensors(SENSOR_GPS) && STATE(GPS_FIX) && gpsSol.numSat >= 6 && gpsSol.groundSpeed >= 300;