1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

GPS can now be conditionally compiled in.

This commit is contained in:
Dominic Clifton 2014-06-28 20:20:16 +09:00
parent b3a718882c
commit 3b629d58a0
19 changed files with 144 additions and 29 deletions

View file

@ -113,12 +113,18 @@ void processRcStickPositions(rxConfig_t *rxConfig, throttleStatus_e throttleStat
if (rcSticks == THR_LO + YAW_LO + PIT_LO + ROL_CE) {
// GYRO calibration
gyroSetCalibrationCycles(CALIBRATING_GYRO_CYCLES);
if (feature(FEATURE_GPS))
#ifdef GPS
if (feature(FEATURE_GPS)) {
GPS_reset_home_position();
}
#endif
#ifdef BARO
if (sensors(SENSOR_BARO))
baroSetCalibrationCycles(10); // calibrate baro to new ground level (10 * 25 ms = ~250 ms non blocking)
#endif
if (!sensors(SENSOR_MAG))
heading = 0; // reset heading to zero after gyro calibration