Skip to content

Commit

Permalink
Fix typo on openloop current limit
Browse files Browse the repository at this point in the history
  • Loading branch information
TechAUmNu authored Aug 19, 2022
1 parent ba7347a commit 2620eed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion motor/mcpwm_foc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3346,7 +3346,7 @@ static void timer_update(motor_all_state_t *motor, float dt) {
float openloop_current = fabsf(motor->m_motor_state.iq_filter);
openloop_current += conf_now->foc_sl_openloop_boost_q;
if (conf_now->foc_sl_openloop_max_q > 0.0) {
utils_truncate_number(&openloop_current, 0.0, conf_now->foc_sl_openloop_boost_q);
utils_truncate_number(&openloop_current, 0.0, conf_now->foc_sl_openloop_max_q);
}

float openloop_rpm_max = utils_map(openloop_current,
Expand Down

0 comments on commit 2620eed

Please sign in to comment.