tuning variable moved from global to Class PID

global ctrlDirection flag removed

removed global flag modeIndex