FSG / Battery_Linear_Actuator

Dependents:   7_21_17_FSG 7_26_17_FSG

Fork of Battery_Linear_Actuator_ by FSG

Revision:
1:ca2454ef80d9
Parent:
0:645ad86abcba
Child:
2:627fd46c2b99
--- a/Battery_Linear_Actuator.h	Fri Jun 09 17:32:14 2017 +0000
+++ b/Battery_Linear_Actuator.h	Fri Jun 30 18:32:40 2017 +0000
@@ -6,6 +6,9 @@
 
 class Battery_Linear_Actuator
 {
+    std::string::size_type sz;   // alias of size_t     //TEST 6/21
+    
+    
     //CLASS VARIABLES and DEFINITIONS
     int motor_absolute_position; 
     //float pot_check_inches;   
@@ -14,21 +17,54 @@
     int linear_actuator_motor_speed;  //5 seconds of full travel between 0 and 175,000 (1000 is about 3 seconds)
     
     int map_check;
+    
+    int actual_position;
+    
+//    float la_P_gain;
+//    float la_I_gain;
+//    float la_D_gain;
+    float curr_time;
+    float dt;    
+    float la_error;
+    float la_error_sum;  
+    float la_derivative_error;  
+    float lastErr;   
+    float lastTime;  
+    
+    float la_integral;
+    float la_output;
 
 public:
-    Battery_Linear_Actuator();    //pass variables to a constructor (don't need anything passed to it)
+    Battery_Linear_Actuator();      //pass variables to a constructor (don't need anything passed to it)
     
     
-    //KEYBOARD FUNCTIONS
+    //Function declarations for KEYBOARD FUNCTIONS  //don't forget the semi-colon!
     string Keyboard_A();
     string Keyboard_D();
-    string Keyboard_E();             //don't forget the semi-colon!
+    string Keyboard_E();
     string Keyboard_H();
     string Keyboard_I();
+    string Keyboard_J();
+    string Keyboard_K();
+    string Keyboard_L();
     string Keyboard_O();             
+    string Keyboard_U();
     void Keyboard_P();  
-    string Keyboard_Q();                        
+    string Keyboard_Q();
+    
+    //new stuff 6/19/17
+    string Velocity(int velocity);
+    string get_pos();
+    
+    //new 6/22/17
+    string velocity_only(int velocity);
+    
+    
+    string PID_velocity_control(float la_setPoint, float IMU_pitch_angle, float la_P_gain, float la_I_gain, float la_D_gain);
+                            
     int MC_readable();
+    char MC_getc();    //return the character that is received from MC.getc() 
+    string MC_readable_redux();
     
     string Keyboard_LEFT_BRACKET();
     string Keyboard_RIGHT_BRACKET();