Setting current limits in main loop

Hey @wrcman555,

The questions about real-time updates limits are popping up a lot, and it is a bug on our side. We will fix it soon.

Basically, in order to change the current limit you’ll need to change the PID limits as well.

motor.current_limit=1;  // amps
motor.PID_velocity.limit = motor.current_limit;

If you’re using the voltage control and setting the voltage limit you’ll need to change both:

motor.voltage_limit=1;  // volts
motor.PID_velocity.limit = motor.voltage_limit;

We have been concentrated on the commander interface (where we do this automatically) and neglected this programmatic way of changing the limit values.