![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: function_utilities/function_utilities.cpp
- Revision:
- 32:4b8c0fedaf2c
- Parent:
- 30:8d561f16383b
- Child:
- 33:91b17819ec30
--- a/function_utilities/function_utilities.cpp Tue Oct 08 07:15:05 2019 +0000 +++ b/function_utilities/function_utilities.cpp Mon Nov 11 09:48:00 2019 +0000 @@ -168,6 +168,8 @@ int VALVE_MIN_POS; int DDV_CENTER; int VALVE_POS_NUM; +float VALVE_CENTER_OFFSET; +int VALVE_CENTER_OFFSET_times10; int TMR3_COUNT_FINDHOME; int TMR3_COUNT_FLOWRATE; @@ -416,6 +418,7 @@ writer.write(RID_VALVE_MIN_POS, (int) VALVE_MIN_POS); writer.write(RID_DDV_CENTER, (int) DDV_CENTER); writer.write(RID_VALVE_POS_NUM, (int) VALVE_POS_NUM); + writer.write(RID_VALVE_CENTER_OFFSET, (int) (VALVE_CENTER_OFFSET * 10.0f)); writer.close(); @@ -423,7 +426,7 @@ void ROM_CALL_DATA(void) { BNO = flashReadInt(Rom_Sector, RID_BNO); - BNO = 5; + BNO = 11; 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); @@ -471,8 +474,8 @@ HOMEPOS_OFFSET = flashReadInt(Rom_Sector, RID_HOMEPOS_OFFSET); HOMEPOS_VALVE_OPENING = flashReadInt(Rom_Sector, RID_HOMEPOS_VALVE_OPENING); TORQUE_VREF = (float) (flashReadInt(Rom_Sector, RID_TORQUE_SENSOR_VREF)) *0.001f; - PRES_A_VREF = (float) flashReadInt(6, RID_PRES_A_SENSOR_VREF) * 0.001f; - PRES_B_VREF = (float) flashReadInt(6, RID_PRES_B_SENSOR_VREF) * 0.001f; + PRES_A_VREF = (float) flashReadInt(Rom_Sector, RID_PRES_A_SENSOR_VREF) * 0.001f; + PRES_B_VREF = (float) flashReadInt(Rom_Sector, RID_PRES_B_SENSOR_VREF) * 0.001f; VALVE_GAIN_LPM_PER_V[0] = (float) (flashReadInt(Rom_Sector, RID_VALVE_GAIN_PLUS_1)) * 0.01f; VALVE_GAIN_LPM_PER_V[2] = (float) (flashReadInt(Rom_Sector, RID_VALVE_GAIN_PLUS_2)) * 0.01f; VALVE_GAIN_LPM_PER_V[4] = (float) (flashReadInt(Rom_Sector, RID_VALVE_GAIN_PLUS_3)) * 0.01f; @@ -495,6 +498,7 @@ VALVE_MIN_POS = flashReadInt(Rom_Sector, RID_VALVE_MIN_POS); DDV_CENTER = flashReadInt(Rom_Sector, RID_DDV_CENTER); VALVE_POS_NUM = flashReadInt(Rom_Sector, RID_VALVE_POS_NUM); + VAVLE_CENTER_OFFSET = (float) (flashReadInt(Rom_Sector, RID_VALVE_CENTER_OFFSET)) * 0.1f; }