-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
tf-2md3-firmware/tfrog-motordriver/controlPWM.c
Lines 533 to 544 in 2c9d607
// Check hall signal consistency | |
if (motor_param[i].enc_type == 2) | |
{ | |
int err = motor_param[i].enc0 - enc0; | |
normalize(&err, -motor_param[i].enc_rev_h, motor_param[i].enc_rev_h, motor_param[i].enc_rev); | |
// In worst case, initial encoder origin can have offset of motor_param[i].enc_rev/12. | |
if (_abs(err) > motor_param[i].enc_rev / 6) | |
{ | |
motor[i].error_state |= ERROR_HALL_ENC; | |
printf("PWM:enc-hall err (%d)\n\r", err); | |
} | |
} |
like
tf-2md3-firmware/tfrog-motordriver/controlPWM.c
Lines 399 to 404 in 2c9d607
if (driver_state.error.hall[i] > 12) | |
{ | |
// エラー検出後、1周以内に再度エラーがあれば停止 | |
motor[i].error_state |= ERROR_HALL_SEQ; | |
printf("PWM:hall err (%x-%x)\n\r", _hall[i], hall[i]); | |
} |
Metadata
Metadata
Assignees
Labels
No labels