Target velocity offset

Thanks for the rapid support !!

I followed the suggested steps - test the sensors, poles…, open loop and then velocity control.
I don’t understand yet how to use current control. Looking at the examples i added to the velocity control example:

InlineCurrentSense current_sense = InlineCurrentSense(0.01, 50.0, A1, A2);

in setup():
current_sense.init(); // initialise the current sensing
current_sense.gain_b *= -1; // for SimpleFOCShield v2.01/v2.0.2
motor.linkCurrentSense(&current_sense); // link the current sense to the motor

But i don’t understand how to use the following for velocity control:
motor.torque_controller = TorqueControlType::foc_current;
and the current PID settings.

The 2 test results were both with hall sensors as foc sensor.
The first group is using one of the hall sensor pins to check the frequency on the scope.
The second group is using an independent (on the motor shaft) 10 slots wheel optical sensor.
The Hz are the readings on the scope at different target velocities.

looks like i miscalculated the conversion. I must have been at max RPM of the motor. This explains why i could not ho higher - thanks!