message: velocity limiting in current control mode
diff: #include "odrive_main.h"
  -
  -Controller::Controller(Config_t& config) :
  - config_(config)
  -{}
  +Controller::Controller(Config_t& config) : config_(config) {}
  void Controller::reset() {
  pos_setpoint_ = 0.0f;
  @@ -203,6 +200,26 @@ bool Controller::update(float pos_estimate, float vel_estimate, float* current_s
  Iq = -Ilim;
  }
  + // Velocity limiting in current mode
  + if (config_.control_mode < CTRL_MODE_VELOCITY_CONTROL) {
  + float vmax = (config_.vel_limit - fabsf(vel_estimate)) * config_.vel_gain;
  + if (Iq > 0 && Iq > vmax) {
  + limited = true;
  + if (vmax > 0) {
  + Iq = vmax;
  + } else {
  + Iq = 0;
  + }
  + } else if (Iq < 0 && Iq < -vmax) {
  + limited = true;
  + if (vmax > 0) {
  + Iq = -vmax;
  + } else {
  + Iq = 0;
  + }
  + }
  + }
  +
  // Velocity integrator (behaviour dependent on limiting)
  if (config_.control_mode < CTRL_MODE_VELOCITY_CONTROL) {
  // reset integral if not in use
  