bldc driver firmware based on hobbyking cheetah compact

Dependencies:   BLDC_V2 mbed-dev-f303 FastPWM3

Dependents:   BLDC_V2

Revision:
44:efcde0af8390
Parent:
38:67e4e1453a4b
Child:
45:aadebe074af6
--- a/Calibration/calibration.cpp	Fri May 25 16:10:46 2018 +0000
+++ b/Calibration/calibration.cpp	Sat Jul 14 22:03:52 2018 +0000
@@ -6,6 +6,8 @@
 #include "foc.h"
 #include "PreferenceWriter.h"
 #include "user_config.h"
+#include "motor_config.h"
+#include "current_controller_config.h"
 
 void order_phases(PositionSensor *ps, GPIOStruct *gpio, ControllerStruct *controller, PreferenceWriter *prefs){   
     
@@ -14,10 +16,10 @@
     printf("\n\r Checking phase ordering\n\r");
     float theta_ref = 0;
     float theta_actual = 0;
-    float v_d = .25;                                                             //Put all volts on the D-Axis
-    float v_q = 0.0;
+    float v_d = .15f;                                                             //Put all volts on the D-Axis
+    float v_q = 0.0f;
     float v_u, v_v, v_w = 0;
-    float dtc_u, dtc_v, dtc_w = .5;
+    float dtc_u, dtc_v, dtc_w = .5f;
     int sample_counter = 0;
     
     ///Set voltage angle to zero, wait for rotor position to settle
@@ -86,10 +88,10 @@
     int raw_b[n] = {0};
     float theta_ref = 0;
     float theta_actual = 0;
-    float v_d = .25;                                                             // Put volts on the D-Axis
-    float v_q = 0.0;
+    float v_d = .15f;                                                             // Put volts on the D-Axis
+    float v_q = 0.0f;
     float v_u, v_v, v_w = 0;
-    float dtc_u, dtc_v, dtc_w = .5;
+    float dtc_u, dtc_v, dtc_w = .5f;
     
         
     ///Set voltage angle to zero, wait for rotor position to settle