Kim GiJeong / Mbed 2 deprecated HydraulicControlBoard_LIGHT_GJ

Dependencies:   mbed FastPWM

Files at this revision

API Documentation at this revision

Comitter:
Lightvalve
Date:
Wed Nov 20 12:55:18 2019 +0000
Parent:
34:bb2ca2fc2a8e
Child:
36:a46e63505ed8
Commit message:
191120

Changed in this revision

CAN/function_CAN.cpp Show annotated file Show diff for this revision Revisions of this file
function_utilities/function_utilities.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
setting.h Show annotated file Show diff for this revision Revisions of this file
--- a/CAN/function_CAN.cpp	Tue Nov 19 13:13:28 2019 +0000
+++ b/CAN/function_CAN.cpp	Wed Nov 20 12:55:18 2019 +0000
@@ -685,7 +685,7 @@
         torq.ref = (double)temp_presdiff;   
     } else if(address==CID_RX_REF_VOUT) {
         int16_t temp_PWM = (int16_t) (msg.data[0] | msg.data[1] << 8);
-        Vout.ref = (double)temp_PWM;   
+        Vout.ref = (double)temp_PWM;
     } else if(address==CID_RX_REF_VALVE_POSITION) {
         int16_t temp_valve_pos = (int16_t) (msg.data[0] | msg.data[1] << 8);
         valve_pos.ref = (double)temp_valve_pos; 
--- a/function_utilities/function_utilities.cpp	Tue Nov 19 13:13:28 2019 +0000
+++ b/function_utilities/function_utilities.cpp	Wed Nov 20 12:55:18 2019 +0000
@@ -222,6 +222,7 @@
 int VALVE_ID_timer = 0;
 int VALVE_DZ_timer = 0;
 int VALVE_FR_timer = 0;
+//int VALVE_HPL_timer = 0;
 int VALVE_POS_TMP = 0;
 int JOINT_VEL_TMP = 0;
 int DDV_POS_AVG = 0;
@@ -430,7 +431,7 @@
 void ROM_CALL_DATA(void)
 {
     BNO = flashReadInt(Rom_Sector, RID_BNO);
-    BNO = 1;
+    BNO = 0;
     OPERATING_MODE = flashReadInt(Rom_Sector, RID_OPERATING_MODE);
     CAN_FREQ = flashReadInt(Rom_Sector, RID_CAN_FREQ);
     DIR_JOINT_ENC = flashReadInt(Rom_Sector, RID_JOINT_ENC_DIR);
--- a/main.cpp	Tue Nov 19 13:13:28 2019 +0000
+++ b/main.cpp	Wed Nov 20 12:55:18 2019 +0000
@@ -258,7 +258,9 @@
     } else if(REF_JOINT_VEL < min(JOINT_VEL[VALVE_POS_NUM-1], JOINT_VEL[VALVE_POS_NUM-2])) {
         Ref_Valve_Pos_FF = (float) VALVE_MIN_POS;
     }
-
+    
+    //VELOCITY_COMP_GAIN = 20;
+    //CAN_TX_PRES((int16_t)(Ref_Valve_Pos_FF), (int16_t) (7));
     Ref_Valve_Pos_FF = (float) VELOCITY_COMP_GAIN * 0.01f * (float) (Ref_Valve_Pos_FF - DDV_CENTER) + DDV_CENTER;
 
     return Ref_Valve_Pos_FF;
@@ -1754,4 +1756,3 @@
 
 
 
-
--- a/setting.h	Tue Nov 19 13:13:28 2019 +0000
+++ b/setting.h	Wed Nov 20 12:55:18 2019 +0000
@@ -311,6 +311,7 @@
 extern int VALVE_ID_timer;
 extern int VALVE_DZ_timer;
 extern int VALVE_FR_timer;
+extern int VALVE_HPL_timer;
 extern int VALVE_POS_TMP;
 extern int JOINT_VEL_TMP;
 extern int DDV_POS_AVG ;
@@ -404,3 +405,4 @@
 
 
 
+