1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +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,19 +104,19 @@ void calculateEstimatedAltitude(timeUs_t currentTimeUs)
#endif
#ifdef USE_GPS
if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) {
gpsAlt = gpsSol.llh.altCm;
if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) {
gpsAlt = gpsSol.llh.altCm;
#ifdef USE_VARIO
gpsVertSpeed = GPS_verticalSpeedInCmS;
gpsVertSpeed = GPS_verticalSpeedInCmS;
#endif
haveGpsAlt = true;
haveGpsAlt = true;
if (gpsSol.hdop != 0) {
gpsTrust = 100.0 / gpsSol.hdop;
if (gpsSol.hdop != 0) {
gpsTrust = 100.0 / gpsSol.hdop;
}
// always use at least 10% of other sources besides gps if available
gpsTrust = MIN(gpsTrust, 0.9f);
}
// always use at least 10% of other sources besides gps if available
gpsTrust = MIN(gpsTrust, 0.9f);
}
#endif
if (ARMING_FLAG(ARMED) && !altitudeOffsetSet) {