Implemented rotor pwm calculations. Ready for compile