Merge branch 'master' into devel

This commit is contained in:
Oskar Weigl
2017-09-18 22:22:18 -07:00
2 changed files with 5 additions and 4 deletions
+2 -4
View File
@@ -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;
}
+3
View File
@@ -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.