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-dev-f303 FastPWM3
Dependents: GT_MOTOR_24NM_V03 GT_MOTOR_24NM_V03_PT1000CalTemp
Diff: main.cpp
- Revision:
- 38:67e4e1453a4b
- Parent:
- 37:c0f352d6e8e3
- Child:
- 39:3580a907ef93
diff -r c0f352d6e8e3 -r 67e4e1453a4b main.cpp
--- a/main.cpp Fri Apr 13 13:50:54 2018 +0000
+++ b/main.cpp Mon May 14 20:59:02 2018 +0000
@@ -10,7 +10,7 @@
#define SETUP_MODE 4
#define ENCODER_MODE 5
-#define VERSION_NUM "1.4"
+#define VERSION_NUM "1.5"
float __float_reg[64]; // Floats stored in flash
@@ -247,6 +247,7 @@
if(state_change){
enter_torque_mode();
count = 0;
+ controller.t_ff = 15.0f;
}
else{
/*
@@ -269,12 +270,13 @@
}
commutate(&controller, &observer, &gpio, controller.theta_elec); // Run current loop
controller.timeout += 1;
- /*
+
count++;
- if(count == 1000){
+ if(count == 40000){
+ controller.t_ff = -controller.t_ff;
count = 0;
}
- */
+
}
break;