LIGHT2

Dependencies:   FastPWM mbed

Revision:
46:2694daea349b
Parent:
45:35fa6884d0c6
Child:
48:889798ff9329
diff -r 35fa6884d0c6 -r 2694daea349b function_utilities/function_utilities.cpp
--- a/function_utilities/function_utilities.cpp	Thu Jan 16 12:05:15 2020 +0000
+++ b/function_utilities/function_utilities.cpp	Mon Jan 20 08:05:21 2020 +0000
@@ -37,6 +37,9 @@
 float I_GAIN_JOINT_TORQUE = 0.0;
 float D_GAIN_JOINT_TORQUE = 0.0;
 
+int16_t K_SPRING = 0.0;
+int16_t D_DAMPER = 0.0;
+
 //float P_GAIN_VALVE_POSITION_OPP = 0.0f;
 //float I_GAIN_VALVE_POSITION_OPP= 0.0f;
 //float D_GAIN_VALVE_POSITION_OPP= 0.0f;
@@ -421,6 +424,9 @@
     writer.write(RID_VALVE_MIN_POS, (int) VALVE_MIN_POS);
     writer.write(RID_DDV_CENTER, (int) (DDV_CENTER * 10.0f));
     writer.write(RID_VALVE_POS_NUM, (int) VALVE_POS_NUM);
+    
+    writer.write(RID_K_SPRING, (int) K_SPRING);
+    writer.write(RID_D_DAMPER, (int) D_DAMPER);
 
     writer.close();
 
@@ -501,6 +507,9 @@
     VALVE_MIN_POS = flashReadInt(Rom_Sector, RID_VALVE_MIN_POS);
     DDV_CENTER = (float) (flashReadInt(Rom_Sector, RID_DDV_CENTER)) * 0.1f;
     VALVE_POS_NUM = flashReadInt(Rom_Sector, RID_VALVE_POS_NUM);
+    
+    K_SPRING = flashReadInt(Rom_Sector, RID_K_SPRING);
+    D_DAMPER = flashReadInt(Rom_Sector, RID_D_DAMPER);
 
 }