modified 0511
Dependencies: mbed-dev FastPWM3
Diff: main.cpp
- Revision:
- 27:501fee691e0e
- Parent:
- 26:2b865c00d7e9
- Child:
- 28:8c7e29f719c5
diff -r 2b865c00d7e9 -r 501fee691e0e main.cpp --- a/main.cpp Mon May 01 15:22:58 2017 +0000 +++ b/main.cpp Wed May 17 14:53:22 2017 +0000 @@ -249,8 +249,8 @@ //TIM1->CCR2 = 0x708*(1.0f); //controller.i_q_ref = controller.t_ff/KT_OUT; - //torque_control(&controller); - controller.i_q_ref = 1; + torque_control(&controller); + //controller.i_q_ref = 1; commutate(&controller, &gpio, controller.theta_elec); // Run current loop spi.Sample(); // Sample position sensor toggle.write(0);