mag init after gyro

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@202 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop 2012-08-23 23:50:52 +00:00
parent fd9d077d8b
commit 70db9006af
2 changed files with 10 additions and 10 deletions

View File

@ -706,11 +706,11 @@
:102C000003F01BFC10B1032030700AE0307840B9AB
:102C100094F8420010B184F84280C5E70120FEF725
:102C200048F9CB48103003F0E3FD38B9C8481030FC
:102C300002F0FCF810B90220FEF73BF902F008FAA6
:102C400010B90420FEF735F90120FEF725F918B177
:102C5000BF48103800688047BD480068804727B1EA
:102C6000B4F8440003F000FD04E01DB9B4F84400DA
:102C700002F053FDB4F93C00642290FBF2F102FB38
:102C300002F0FCF810B90220FEF73BF90120FEF784
:102C40002BF918B1C248103800688047C0480068A6
:102C5000804727B1B4F8440003F006FD04E01DB935
:102C6000B4F8440002F059FD02F0F2F910B9042062
:102C7000FEF71FF9B4F93C00642290FBF2F102FB6D
:102C800011000CB205F0D7F8B34904F048FF05462F
:102C9000204605F0D0F8294604F0E9FEAF4904F0DB
:102CA0003EFFAF490860BDE8F88370B50546A74808

View File

@ -97,11 +97,6 @@ retry:
}
#endif
#ifdef MAG
if (!hmc5883lDetect())
sensorsClear(SENSOR_MAG);
#endif
// Now time to init things, acc first
if (sensors(SENSOR_ACC))
acc.init();
@ -116,6 +111,11 @@ retry:
mpu3050Config(cfg.gyro_lpf);
}
#ifdef MAG
if (!hmc5883lDetect())
sensorsClear(SENSOR_MAG);
#endif
// calculate magnetic declination
deg = cfg.mag_declination / 100;
min = cfg.mag_declination % 100;