Inductance Testing Code

Dependencies:   mbed

Fork of CurrentModeSine by Austin Brown

Revision:
1:64b881306f6f
Parent:
0:9edd6ec0f56a
--- a/structs.h	Sat May 20 21:42:20 2017 +0000
+++ b/structs.h	Thu Oct 11 04:13:45 2018 +0000
@@ -1,48 +1,35 @@
 #ifndef STRUCTS_H
 #define STRUCTS_H
 
-//#include "CANnucleo.h"
 #include "mbed.h"
-#include "FastPWM.h"
-
 
-typedef struct{
-    DigitalOut *enable;
-    FastPWM *pwm_ul, *pwm_vl, *pwm_wl, *pwm_uh, *pwm_vh, *pwm_wh;
-    int phasing;
-    } GPIOStruct;
     
 typedef struct{
-    
-    }COMStruct;
-    
-typedef struct{
-    int adc1_raw, adc2_raw;
+
     float i_a, i_b, i_c;
     float v_bus;
-    float theta_mech, theta_elec;
-    float dtheta_mech, dtheta_elec;
+    float theta_mech, theta_elec, theta_elec_adv;
     float i_d, i_q;
     float v_d, v_q;
     float dtc_u, dtc_v, dtc_w;
     float v_u, v_v, v_w;
+    float test_d, test_q;
     float d_int, q_int;
-    int adc1_offset, adc2_offset;
     float i_d_ref, i_q_ref;
     int loop_count;
     int mode;
-    float cogging[128];
-    } ControllerStruct;
+    } FocStruct;
+    
+
+    
+    
 
 typedef struct{
-    float vel_1;
-    float vel_1_old;
-    float vel_1_est;
-    float vel_2;
-    float vel_2_old;
-    float vel_2_est;
-    float ts;
-    float est;
-    } VelocityEstimatorStruct;
+    int can_dead_count;
+    float throttle_frac;
+    int status;
+    } CommandStruct;
+
+
     
 #endif