Here's the modified throttleAverage code, as a sample. Thanks for the suggestion, Astro! I'm making the same change to pwmAverage and temperatureAverage. Totally unreadable, but pretty fast. haha:
Code:
throttleAverageTimes1024 // = (31*throttleAverageTimes1024)/1024 + 1*ADThrottle) / 32 * 1024;
// = 32*(throttleAverageTimes1024/1024) - 1*(throttleAverageTimes1024/1024) + 1*ADThrottle) / 32 * 1024;
= ((throttleAverageTimes1024 >> 5) - (throttleAverageTimes1024 >> 10) + (long)ADThrottle) << 5;