ROBOSTEP_5期 / Hobbyking_Cheetah_Compact_DRV8323

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
9:d7eb815cb057
Parent:
8:10ae7bc88d6e
Child:
10:370851e6e132
--- a/CurrentRegulator/CurrentRegulator.h	Wed Apr 13 04:09:56 2016 +0000
+++ b/CurrentRegulator/CurrentRegulator.h	Tue May 10 01:15:57 2016 +0000
@@ -1,5 +1,6 @@
-#ifndef CURRENTRETULATOR_H
+#ifndef CURRENTREGULATOR_H
 #define CURRENTREGULATOR_H
+
 #include "Inverter.h"
 #include "SVM.h"
 #include "PositionSensor.h"
@@ -9,9 +10,10 @@
         CurrentRegulator(Inverter *inverter, PositionSensor *position_sensor, float Kp, float Ki);
         void UpdateRef(float D, float Q);
         void Commutate();
+        void Reset();
     private:
         float IQ_Ref, ID_Ref, V_Q, V_D, V_Alpha, V_Beta, V_A, V_B, V_C, I_Q, I_D, I_A, I_B, I_C, I_Alpha, I_Beta, theta_elec, _Kp, _Ki;
-        float Q_Integral, D_Integral, Q_Error, D_Error, Int_Max, DTC_Max;
+        float Q_Integral, D_Integral, Q_Error, D_Error, Int_Max, DTC_Max, Q_Max;
         void SampleCurrent();
         void SetVoltage();
         void Update();