CN - drv_timer.c changes.
Reduces the time spent in the interrupt handler.
Some variable types also changed from uint8_t to int or unsigned int to help improve code size/speed.
Rudimentary measurement of time spent in the handler seems to indicate a reduction from ~8us down to ~5us (excluding time spent in callbacks).
CN - Add support for using integer maths instead of floating point for motor mixing.
To use the integer math support, define the option MIXER_USES_INTEGER_MATH. There should be no loss of precision using this method.
CN - Fix divide with rounding macro
CN - Changed DIVIDE_WITH_ROUNDING to function
CN - Added integer sine (and cosine) approximation functions. About 15 times quicker than floating point methods, and with negligible loss of precision.
CN - Fix some typos.
CN - Replaced lrintf with non-standard version. The original rounds .5 values the wrong way (2.5 becomes 2, -2.5 becomes -2), is larger, and is slower.
CN - Fix divideWithRounding() function.
CN - And fix DIVIDE_WITH_ROUNDING macro to match function name.
CN - Added option to use integer approximations for cosf and sinf into board alignment functions. The integer approximation method loses practically no precision, and is around 15 times faster than the floating point method.
CN - Altered board rotation so that a rotation context is used.
Added in preparation for converting other similar code to use the same technique, doing away with floating point maths at the same time.
CN - Added support for converting raw gyro ADC values into degrees/sec x 10.
Will be using these values as source to rotation matrix.
CN - Work continuing on removal of floating point support in getEstimatedAttitude().
Added i64sqrt() function, which computes the square root of a 64 bit integer.
Will probably add a 32 bit version at some stage.
CN - Another fix for divide_with_rouunding(). Wasn't working with -ve values.
CN - More work on changing things to use fixed point maths rather than floating point.
CN - Some changes to integer math rotation code. Won't work well with gyro readings as the resolution is too low. Need to undo and switch back to floating point.
CN - Minor changes. Use constant for RAD instead of M_IP/180.0f
CN - Remove fixed point changes I made which won't work.
CN - Minor changes. Changed vbat calculation to use integer maths.
Using DIVIDE_WITH_ROUNDING to do proper rounding of some integers when scaling.
CN - More rounding changes. Changed some variables from int16 to int.