Don't calibrate undriven

This commit is contained in:
Euan Mutch 2023-09-26 09:41:07 +01:00 committed by GitHub
parent 06d834d020
commit 6ae5b63f61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1652,9 +1652,9 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
int faultM1 = FAULT_CODE_NONE; int faultM1 = FAULT_CODE_NONE;
int faultM2 = FAULT_CODE_NONE; int faultM2 = FAULT_CODE_NONE;
// Measure DC offsets including undriven // Measure DC offsets
// Needs to be done before getting the motor configuration // Needs to be done before getting the motor configuration
if(mcpwm_foc_dc_cal(true) == -1) { if(mcpwm_foc_dc_cal(false) == -1) {
return mc_interface_get_fault() - 100; // Offset fault by -100 return mc_interface_get_fault() - 100; // Offset fault by -100
} }