AC : throttle mid point calculation converted to integer math from float for speed

0be731059b64f3aca418b0eb865a7c7b47122355

This is a simple change with no reduction in resolution since the output is an int16_t. Made a test function to confirm the accuracy against the current version and the output is the same.

Also 
fb2069ecdb74b0618d8986c5803d567a39032f29
There were six global vars inited to 0. They should not be inited or the compiler can't optimize.