// Apply current limits
// TODO: Consider D axis current for the input current as well.
const float mod_q = m_motor_state.mod_q;
if (mod_q > 0.001) {
utils_truncate_number(&iq_set_tmp, m_conf->lo_in_current_min / mod_q, m_conf->lo_in_current_max / mod_q);
} else if (mod_q
utils_truncate_number(&iq_set_tmp, m_conf->lo_in_current_max / mod_q, m_conf->lo_in_current_min / mod_q);
}
if (mod_q > 0.0) {
utils_truncate_number(&iq_set_tmp, m_conf->lo_current_min, m_conf->lo_current_max);
} else {
utils_truncate_number(&iq_set_tmp, -m_conf->lo_current_max, -m_conf->lo_current_min);
}
What is the purpose of the above two current limits?
m_conf->lo_in_current_min / mod_q, m_conf->lo_in_current_max / mod_q -----What is the purpose of this sub-process?