20160814

Fork of CURRENT_CONTROL by LDSC_Robotics_TAs

Revision:
2:562bd14dfd3a
Parent:
1:c5973a56d474
Child:
3:c787d1c5ad6a
--- a/CURRENT_CONTROL.h	Fri Apr 22 14:32:01 2016 +0000
+++ b/CURRENT_CONTROL.h	Fri Apr 22 15:21:31 2016 +0000
@@ -15,10 +15,13 @@
 
     CURRENT_CONTROL(PinName curChannel, PinName PwmChannel1, PinName PwmChannel2, PWMIndex pwmIndex, float Kp, float Ki, float Kd, float samplingTime);
     void Control(float curRef);
+    void SetAnalog2Cur(float ratio);
+    //functions for test////////
     void ChangePwmPeriod(float microSeconds);
-    void SetAnalog2Cur(float ratio);
     void SetPWMDuty(float ratio);
-
+    float GetAnalogIn(void);
+    float GetCurrent(void);
+    //////////////////////////
     PWMIndex pwmIndex_;
     PID pid;
     PwmOut MotorPlus;
@@ -29,6 +32,8 @@
     float curFeedBack;
     float analog2Cur;
     AnalogIn currentAnalogIn;
+    float analogInValue;
+    
 private:
 
     float Ts;