Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/flight/position.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) {

if (haveGpsAlt && haveBaroAlt) {
estimatedAltitude = gpsAlt * gpsTrust + baroAlt * (1 - gpsTrust);
} else if (haveBaroAlt) {
estimatedAltitude = baroAlt;
}else if (haveGpsAlt) {
}else if (haveGpsAlt) {
estimatedAltitude = gpsAlt;
}else if (haveBaroAlt) {
estimatedAltitude = baroAlt;
}


Expand Down
4 changes: 2 additions & 2 deletions src/main/interface/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
break;

case MSP_ALTITUDE:
#if defined(USE_BARO) || defined(USE_RANGEFINDER)
#if defined(USE_BARO) || defined(USE_RANGEFINDER) || defined(USE_GPS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take care #323 won't bring in similar.

sbufWriteU32(dst, getEstimatedAltitude());
#else
sbufWriteU32(dst, 0);
Expand Down Expand Up @@ -1983,7 +1983,7 @@ mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
currentPidProfile->dFilter[YAW].Wc = sbufReadU8(src);
gyroConfigMutable()->dyn_notch_q_factor = sbufReadU16(src);
gyroConfigMutable()->dyn_notch_min_hz = sbufReadU16(src);

}

// reinitialize the gyro filters with the new values
Expand Down