mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
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:
parent
fd9d077d8b
commit
70db9006af
2 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue