![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
distribution-201229
Diff: function_utilities/function_utilities.cpp
- Revision:
- 17:1865016ca2e7
- Parent:
- 16:903b5a4433b4
- Child:
- 18:b8adf1582ea3
--- a/function_utilities/function_utilities.cpp Mon Sep 02 13:32:33 2019 +0000 +++ b/function_utilities/function_utilities.cpp Tue Sep 03 11:59:55 2019 +0000 @@ -21,12 +21,12 @@ uint8_t SETTING_SWITCH_OLD = 0; uint8_t REFERENCE_MODE = 0; uint16_t CAN_FREQ = 500; -uint8_t DIR_JOINT_ENC = 0; -uint8_t DIR_VALVE = 0; -uint8_t DIR_VALVE_ENC = 0; +int16_t DIR_JOINT_ENC = 0; +int16_t DIR_VALVE = 0; +int16_t DIR_VALVE_ENC = 0; double SUPPLY_VOLTAGE = 12.0; -double VALVE_VOLTAGE_LIMIT = 5.0; +double VALVE_VOLTAGE_LIMIT = 12.0; double P_GAIN_VALVE_POSITION = 0.0; double I_GAIN_VALVE_POSITION= 0.0; @@ -148,7 +148,7 @@ int VALVE_INPUT_PWM; double VALVE_GAIN_LPM_PER_V[10]; -double VALVE_POS_VS_PWM[18]; +double VALVE_POS_VS_PWM[25]; long JOINT_VEL[100]; int VALVE_MAX_POS; @@ -196,8 +196,8 @@ double CUR_PRES_B_mean = 0.0; double CUR_TORQUE_sum = 0.0; double CUR_TORQUE_mean = 0.0; -double PRES_A_NULL = 10.0; -double PRES_B_NULL = 10.0; +double PRES_A_NULL = 1.0; +double PRES_B_NULL = 1.0; double TORQUE_NULL = 3900; double Ref_Valve_Pos_Old = 0.0; @@ -456,7 +456,7 @@ VALVE_GAIN_LPM_PER_V[5] = (double) (flashReadInt(Rom_Sector, RID_VALVE_GAIN_MINUS_3)) * 0.01; VALVE_GAIN_LPM_PER_V[7] = (double) (flashReadInt(Rom_Sector, RID_VALVE_GAIN_MINUS_4)) * 0.01; VALVE_GAIN_LPM_PER_V[9] = (double) (flashReadInt(Rom_Sector, RID_VALVE_GAIN_MINUS_5)) * 0.01; - for(int i=0; i<18; i++) + for(int i=0; i<25; i++) { VALVE_POS_VS_PWM[i] = (double) (flashReadInt(Rom_Sector, RID_VALVE_POS_VS_PWM_0 + i)); }