AdaptiveControl: added integral on position error. Removed initialization of pi variable