1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

unroll loop for better code size

gcc remove 29 bytes here
This commit is contained in:
Trey Marc 2014-06-12 03:50:16 +02:00
parent 2fef9d5fa9
commit 4ccf31d514

View file

@ -62,12 +62,11 @@ void computeIMU(void)
if (mcfg.mixerConfiguration == MULTITYPE_TRI) {
gyroData[YAW] = (gyroYawSmooth * 2 + gyroADC[YAW]) / 3;
gyroYawSmooth = gyroData[YAW];
gyroData[ROLL] = gyroADC[ROLL];
gyroData[PITCH] = gyroADC[PITCH];
} else {
for (axis = 0; axis < 3; axis++)
gyroData[axis] = gyroADC[axis];
gyroData[YAW] = gyroADC[YAW];
}
gyroData[ROLL] = gyroADC[ROLL];
gyroData[PITCH] = gyroADC[PITCH];
}
// **************************************************