mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-22 08:04:07 +08:00
minor R measure correction
This commit is contained in:
@@ -832,7 +832,7 @@ static bool measure_phase_resistance(Motor_t* motor, float test_current, float m
|
||||
queue_voltage_timings(motor, 0.0f, 0.0f);
|
||||
|
||||
float R = test_voltage / test_current;
|
||||
if (fabs(test_voltage) == max_voltage || R < 0.01f || R > 1.0f) {
|
||||
if (fabs(test_voltage) == fabs(max_voltage) || R < 0.01f || R > 1.0f) {
|
||||
motor->error = ERROR_PHASE_RESISTANCE_OUT_OF_RANGE;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user