Fix typo on openloop current limit

This commit is contained in:
Euan Mutch 2022-08-19 20:36:29 +01:00 committed by GitHub
parent ba7347a5a6
commit 2620eed66c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,