Ikhee Jo / T-Motor_AK80_BaseCode

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
11:c83b18d41e54
Parent:
9:d7eb815cb057
Child:
12:c473a25f54f7
--- a/CurrentRegulator/CurrentRegulator.cpp	Thu May 12 05:02:52 2016 +0000
+++ b/CurrentRegulator/CurrentRegulator.cpp	Sun May 22 00:14:59 2016 +0000
@@ -9,7 +9,7 @@
 
 CurrentRegulator::CurrentRegulator(Inverter *inverter, PositionSensor *position_sensor, float Kp, float Ki){
     _Inverter = inverter;
-    PWM = new SPWM(inverter, 2.0);
+    PWM = new SVPWM(inverter, 2.0);
     _PositionSensor = position_sensor;
     IQ_Ref = 0;
     Q_Max = 40.0f;
@@ -45,7 +45,11 @@
     
     
     }
-
+    
+float CurrentRegulator::GetQ(){
+    return I_Q;
+    }
+    
 void CurrentRegulator::Reset(void){
     IQ_Ref = 0;
     ID_Ref = 0;
@@ -139,6 +143,8 @@
         pc->printf("%f\n\r", _PositionSensor->GetMechPosition());
         count = 0;
         }
+
+    }
+    
       */  
-        
-    }
\ No newline at end of file
+      }