The controller now keeps track of what it thinks the manual out and pid setpoint should be. It updates based on these values. It makes sure to check whether the command went through, and only updates itself if the command did go through. The internal value is matched to the value in the data at the beginning of every call for ramp or regulate, as well as every request for a pid output mode change, so I haven't put any periodic comparisons.