Thank you for your efforts. I had no closer look at your changes, the main thing seems to be the averaging the torque, that you switched from >>5 to /PAS_IMP_PER_TURN
If you do so, please remind, that a division takes a lot of clock cycles, so avoid it, where you can. That's the reason, why I use a right shift instead, where ever possible.
I was not aware of the division problem.
I changed it to a multiplication using the Fast Integer Division Approximation (chat gbt gave me this hint)
Now it still have the same functionality but without division in the main loop.
I have make a new pull request.
Unfortunaly i could not test if it compile well because of a Githup update the online compiler with the Github-Action don`t work any more. It would be nice if you can have a look on this.
Beside this i have only done changes to the Java Configurator
Be aware, that my way of averaging is not the arithmetic middle of the values of one crank revolution anyway. See this little piece of code, just hit the run button at the top of the window. The value iterates to the final value much slower.
Of this fact i was aware. It was the main reason for my improvements regarding the impulses per turn.
I have a sensor with 16 Impulses per turn (Erider T17) and when you press with e.g. 100% torque it need 4 turns to reach even 80% of the aimed torque output.
That was for me much to slow especialy when starting on a hill.
During writing the documentation there come up some questions to me.
Is the gear ration value somehow needed when you have a external speed sensor?
You have recommended me a maximum motor current of 50A for my Shengyi DGWX2 Motor (gear motor 250 W) and say my maximum Battery Current of 10 A would be a good value for my controller.

How you came to this conclusions ?
I think the maximum Battery Current protect mainly the controller against overheating and the battery against to much load.
At the end the controller protected it selfe by measuring the temperature but a good value prevent that it even come to overtemperature.
But i don`t get the point with the phase curent (motor current). How can it even be higher then the battery current because there are not so big condensators in the controller that it can output a higher current the inputed by the battery i think.
Or in other words what could happen in worst case if sombody enter a much higher value (as long as the motor is not a way to small for the controller and the maximum Battery Current is set properply )?