Reverse code of commit "Use global data to update the PID gain"