Not too many changes to the code, I have futzed around with getting the HIP chip motor driver to work and it seems that if I increase the frequency pst a few Hz the outputs to the gate drivers stop working, I am looking into why that is now.