diff --git a/MotorControl/low_level.c b/MotorControl/low_level.c index a0827a91..83f284f6 100755 --- a/MotorControl/low_level.c +++ b/MotorControl/low_level.c @@ -865,7 +865,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; @@ -1501,9 +1501,7 @@ void motor_thread(void const * argument) { if (motor->do_calibration) { __HAL_TIM_MOE_ENABLE(motor->motor_timer);// enable pwm outputs motor_calibration(motor); - if(!motor->calibration_ok){ - __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY(motor->motor_timer);// disables pwm outputs - } + __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY(motor->motor_timer);// disables pwm outputs motor->do_calibration = false; } diff --git a/README.md b/README.md index d0cbf037..937cc463 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,9 @@ After installing all of the above, open a Git Bash shell. Continue at section [B ### Building the firmware * Make sure you have cloned the repository. + * For v3.3, you should use the [v3.3-pinout](https://github.com/madcowswe/ODriveFirmware/tree/v3.3-pinout) branch. + * For other versions you should use master + * In the near future this will be controlled with a preprocessor switch, but is done with branches for now. * Navigate your terminal (bash/cygwin) to the ODriveFirmware dir. * Run `make` in the root of this repository.