Velocity motion control with magnetic sensor example not working

I think it’s related to this Estimated_current and velocity mode: high current at standstill - #5 by dekutree64

The PID’s integral term never decays, so when you forcibly rotate the motor with velocity target 0, the non-zero velocity “winds up” and then unwinds back to where it was.