Ikhee Jo / T-Motor_AK80_BaseCode

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
15:ef00814e38e2
Parent:
14:80ce59119d93
Child:
18:f1d56f4acb39
diff -r 80ce59119d93 -r ef00814e38e2 CurrentRegulator/CurrentRegulator.cpp
--- a/CurrentRegulator/CurrentRegulator.cpp	Mon Oct 31 16:48:16 2016 +0000
+++ b/CurrentRegulator/CurrentRegulator.cpp	Sat Dec 10 05:31:06 2016 +0000
@@ -100,8 +100,8 @@
     //Park(I_Alpha, I_Beta, theta_elec, &I_D, &I_Q);
     
     Park(I_Alpha, I_Beta, theta_elec, &ID_Sample, &IQ_Sample);    
-    I_D = .5f*ID_Sample + .5f*ID_Old;
-    I_Q = .5f*IQ_Sample + .5f*IQ_Old;
+    I_D = 1.0f*ID_Sample + 0.0f*ID_Old;
+    I_Q = 1.0f*IQ_Sample + 0.0f*IQ_Old;
     ID_Old = I_D;
     IQ_Old = I_Q;
     //count += 1;