At the moment in voltage mode, if information like phase_resistance, phase_inductance and KV_rating are provided, q and d currents are used as target and the q and d voltages are estimated.
The foc_current could benefit from that and use those values as feedforward for the q and d PI controllers.
The q and d voltage estimation could be made a separate function not to duplicate the code.
That would probably improve the dynamics of the foc current control.