I think it look's good.
Do you test it?
Sorry, my answer is a little incorrect.
I found in your program that you operate with PWM output frequency MI1.
Duty cycle in your code = 0. Then output is not active.
Please SET some constant freqency to MI1. And run PID with MI2 output (Duty cycle).
Then maybe system start working.