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

Allow user provided sensor alignment to override NAZE defaults.

This should have been in 297609d4c3.
This commit is contained in:
Dominic Clifton 2014-04-21 16:16:28 +01:00
parent c6a482b3e0
commit 3813c5027f

View file

@ -118,6 +118,17 @@ retry:
}
#endif
if (mcfg.gyro_align != ALIGN_DEFAULT) {
gyroAlign = mcfg.gyro_align;
}
if (mcfg.acc_align != ALIGN_DEFAULT) {
accAlign = mcfg.acc_align;
}
if (mcfg.mag_align != ALIGN_DEFAULT) {
magAlign = mcfg.mag_align;
}
// Now time to init things, acc first
if (sensors(SENSOR_ACC))
acc.init();