Ikhee Jo / T-Motor_AK80_BaseCode

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
10:370851e6e132
Parent:
7:dc5f27756e02
Child:
14:80ce59119d93
--- a/Transforms/Transforms.cpp	Tue May 10 01:15:57 2016 +0000
+++ b/Transforms/Transforms.cpp	Thu May 12 05:02:52 2016 +0000
@@ -9,8 +9,8 @@
     //float sine = sin(theta);
     float cosine = FastCos(theta);
     float sine = FastSin(theta);
-    *d = alpha*cosine - beta*sine;
-    *q = -beta*cosine - alpha*sine;
+    *d = alpha*cosine - beta*sine;      //This is a hack - effectively using -beta instead of beta
+    *q = -beta*cosine - alpha*sine;     //I think because I'm using pi as the d axis offset instead of zero, but I need to investigate more.
     //*d = alpha*cosine + beta*sine;
     //*q = beta*cosine - alpha*sine;
     //DAC->DHR12R1 = (int) (*q*49.648f) + 2048;