Added functionality to PID controller code module