Merge pull request #123 from treymarc/patch-9
unroll loop for better code size
This commit is contained in:
commit
f22c09630c
|
@ -62,12 +62,11 @@ void computeIMU(void)
|
||||||
if (mcfg.mixerConfiguration == MULTITYPE_TRI) {
|
if (mcfg.mixerConfiguration == MULTITYPE_TRI) {
|
||||||
gyroData[YAW] = (gyroYawSmooth * 2 + gyroADC[YAW]) / 3;
|
gyroData[YAW] = (gyroYawSmooth * 2 + gyroADC[YAW]) / 3;
|
||||||
gyroYawSmooth = gyroData[YAW];
|
gyroYawSmooth = gyroData[YAW];
|
||||||
gyroData[ROLL] = gyroADC[ROLL];
|
|
||||||
gyroData[PITCH] = gyroADC[PITCH];
|
|
||||||
} else {
|
} else {
|
||||||
for (axis = 0; axis < 3; axis++)
|
gyroData[YAW] = gyroADC[YAW];
|
||||||
gyroData[axis] = gyroADC[axis];
|
|
||||||
}
|
}
|
||||||
|
gyroData[ROLL] = gyroADC[ROLL];
|
||||||
|
gyroData[PITCH] = gyroADC[PITCH];
|
||||||
}
|
}
|
||||||
|
|
||||||
// **************************************************
|
// **************************************************
|
||||||
|
|
Loading…
Reference in New Issue