Again, doesn't make sense to assign a delta % to a %. If candidate PWM duty cycle % is decreasing, need the same logic as above with increase to ensure you don't exceed max decrement. As I understand it, a decrease is more important when considering how quickly the fan speed should be allowed to change.
No. This function gets the deltaP, sets the pump control to closed loop and set the closed loop flag to TRUE. In the off state, the minimum DAC is set to 300 RPM and from there the PI controller will take over.
I think this local variable is poorly named. Looking below, it appears to be a pulse count from FPGA. If it is a pulse count, I don't know about the term "toggle" for describing it.