mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 00:49:23 +08:00
fix resistance measurement factor 2 error
This commit is contained in:
@@ -823,7 +823,7 @@ static bool measure_phase_resistance(Motor_t* motor, float test_current, float m
|
||||
motor->error = ERROR_PHASE_RESISTANCE_MEASUREMENT_TIMEOUT;
|
||||
return false;
|
||||
}
|
||||
float Ialpha = -0.5f * (motor->current_meas.phB + motor->current_meas.phC);
|
||||
float Ialpha = -(motor->current_meas.phB + motor->current_meas.phC);
|
||||
test_voltage += (kI * CURRENT_MEAS_PERIOD) * (test_current - Ialpha);
|
||||
if (test_voltage > max_voltage) test_voltage = max_voltage;
|
||||
if (test_voltage < -max_voltage) test_voltage = -max_voltage;
|
||||
|
||||
Reference in New Issue
Block a user