1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Fixed USE_VARIO conditional.Also fixed some indentation.

This commit is contained in:
mikeller 2019-05-01 00:41:04 +12:00
parent cb935ff55c
commit 33a956d123
2 changed files with 10 additions and 10 deletions

View file

@ -104,7 +104,7 @@ void calculateEstimatedAltitude(timeUs_t currentTimeUs)
#endif #endif
#ifdef USE_GPS #ifdef USE_GPS
if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) { if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) {
gpsAlt = gpsSol.llh.altCm; gpsAlt = gpsSol.llh.altCm;
#ifdef USE_VARIO #ifdef USE_VARIO
gpsVertSpeed = GPS_verticalSpeedInCmS; gpsVertSpeed = GPS_verticalSpeedInCmS;
@ -116,7 +116,7 @@ if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) {
} }
// always use at least 10% of other sources besides gps if available // always use at least 10% of other sources besides gps if available
gpsTrust = MIN(gpsTrust, 0.9f); gpsTrust = MIN(gpsTrust, 0.9f);
} }
#endif #endif
if (ARMING_FLAG(ARMED) && !altitudeOffsetSet) { if (ARMING_FLAG(ARMED) && !altitudeOffsetSet) {

View file

@ -60,7 +60,7 @@
#endif #endif
#endif #endif
#if !defined(USE_BARO) && !defined(USE_GPS) #if !defined(USE_BARO)
#undef USE_VARIO #undef USE_VARIO
#endif #endif