Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Hobbyking_Cheetah 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);