reset heading to zero when calibrating gyro w/stick combo on hardware without mag
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@427 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
3744f36895
commit
891bce4e19
2
src/mw.c
2
src/mw.c
|
@ -541,6 +541,8 @@ void loop(void)
|
||||||
GPS_reset_home_position();
|
GPS_reset_home_position();
|
||||||
if (sensors(SENSOR_BARO))
|
if (sensors(SENSOR_BARO))
|
||||||
calibratingB = 10; // calibrate baro to new ground level (10 * 25 ms = ~250 ms non blocking)
|
calibratingB = 10; // calibrate baro to new ground level (10 * 25 ms = ~250 ms non blocking)
|
||||||
|
if (!sensors(SENSOR_MAG))
|
||||||
|
heading = 0; // reset heading to zero after gyro calibration
|
||||||
// Inflight ACC Calibration
|
// Inflight ACC Calibration
|
||||||
} else if (feature(FEATURE_INFLIGHT_ACC_CAL) && (rcSticks == THR_LO + YAW_LO + PIT_HI + ROL_HI)) {
|
} else if (feature(FEATURE_INFLIGHT_ACC_CAL) && (rcSticks == THR_LO + YAW_LO + PIT_HI + ROL_HI)) {
|
||||||
if (AccInflightCalibrationMeasurementDone) { // trigger saving into eeprom after landing
|
if (AccInflightCalibrationMeasurementDone) { // trigger saving into eeprom after landing
|
||||||
|
|
Loading…
Reference in New Issue