Sungwoo Kim
/
HydraulicControlBoard_PostLIGHT_210420
LIGHT2
Diff: function_utilities/function_utilities.cpp
- Revision:
- 55:b25725257569
- Parent:
- 54:647072f5307a
- Child:
- 56:6f50d9d3bfee
diff -r 647072f5307a -r b25725257569 function_utilities/function_utilities.cpp --- a/function_utilities/function_utilities.cpp Tue Feb 25 12:56:39 2020 +0000 +++ b/function_utilities/function_utilities.cpp Wed Feb 26 12:51:52 2020 +0000 @@ -22,7 +22,6 @@ uint8_t FLAG_VALVE_DEADZONE = 0; uint8_t REFERENCE_MODE = 0; int16_t CAN_FREQ = 500; -int CAN_FREQUENCY = 500; int16_t DIR_JOINT_ENC = 0; int16_t DIR_VALVE = 0; int16_t DIR_VALVE_ENC = 0; @@ -83,8 +82,8 @@ int16_t STROKE; -int16_t VALVE_LIMIT_PLUS; -int16_t VALVE_LIMIT_MINUS; +//int16_t VALVE_LIMIT_PLUS; +//int16_t VALVE_LIMIT_MINUS; float ENC_PULSE_PER_POSITION; float TORQUE_SENSOR_PULSE_PER_TORQUE; @@ -164,12 +163,10 @@ int VALVE_MAX_POS; int VALVE_MIN_POS; -float DDV_CENTER; int VALVE_POS_NUM; float VALVE_CENTER_OFFSET; float VALVE_DZ_MINUS_OFFSET; float VALVE_DZ_PLUS_OFFSET; -int VALVE_CENTER_OFFSET_times10; int TMR3_COUNT_FINDHOME = 0; int TMR3_COUNT_FLOWRATE = 0; @@ -411,8 +408,8 @@ writer.write(RID_ENC_LIMIT_MINUS,(int) ENC_LIMIT_MINUS); writer.write(RID_ENC_LIMIT_PLUS,(int) ENC_LIMIT_PLUS); writer.write(RID_STROKE,(int) STROKE); - writer.write(RID_VALVE_LIMIT_MINUS,(int) VALVE_LIMIT_MINUS); - writer.write(RID_VALVE_LIMIT_PLUS,(int) VALVE_LIMIT_PLUS); + //writer.write(RID_VALVE_LIMIT_MINUS,(int) VALVE_LIMIT_MINUS); + //writer.write(RID_VALVE_LIMIT_PLUS,(int) VALVE_LIMIT_PLUS); writer.write(RID_ENC_PULSE_PER_POSITION,(int) (ENC_PULSE_PER_POSITION*10.0f)); writer.write(RID_TORQUE_SENSOR_PULSE_PER_TORQUE,(int) (TORQUE_SENSOR_PULSE_PER_TORQUE * 100.0f)); writer.write(RID_PRES_SENSOR_A_PULSE_PER_BAR,(int) (PRES_SENSOR_A_PULSE_PER_BAR * 100.0f)); @@ -442,7 +439,7 @@ } writer.write(RID_VALVE_MAX_POS, (int) VALVE_MAX_POS); writer.write(RID_VALVE_MIN_POS, (int) VALVE_MIN_POS); - writer.write(RID_DDV_CENTER, (int) (DDV_CENTER * 10.0f)); + //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); @@ -455,6 +452,7 @@ void ROM_CALL_DATA(void) { BNO = flashReadInt(Rom_Sector, RID_BNO); + BNO = 0; OPERATING_MODE = flashReadInt(Rom_Sector, RID_OPERATING_MODE); SENSING_MODE = flashReadInt(Rom_Sector, RID_SENSING_MODE); CURRENT_CONTROL_MODE = flashReadInt(Rom_Sector, RID_CURRENT_CONTROL_MODE); @@ -491,8 +489,8 @@ ENC_LIMIT_MINUS = flashReadInt(Rom_Sector, RID_ENC_LIMIT_MINUS); ENC_LIMIT_PLUS = flashReadInt(Rom_Sector, RID_ENC_LIMIT_PLUS); STROKE = flashReadInt(Rom_Sector, RID_STROKE); - VALVE_LIMIT_MINUS = flashReadInt(Rom_Sector, RID_VALVE_LIMIT_MINUS); - VALVE_LIMIT_PLUS = flashReadInt(Rom_Sector, RID_VALVE_LIMIT_PLUS); + //VALVE_LIMIT_MINUS = flashReadInt(Rom_Sector, RID_VALVE_LIMIT_MINUS); + //VALVE_LIMIT_PLUS = flashReadInt(Rom_Sector, RID_VALVE_LIMIT_PLUS); ENC_PULSE_PER_POSITION = (float) (flashReadInt(Rom_Sector, RID_ENC_PULSE_PER_POSITION)) * 0.1f; // ENC_PULSE_PER_POSITION = (float) 1024.0f; TORQUE_SENSOR_PULSE_PER_TORQUE = (float) (flashReadInt(Rom_Sector, RID_TORQUE_SENSOR_PULSE_PER_TORQUE)) * 0.01f; @@ -526,7 +524,7 @@ } VALVE_MAX_POS = flashReadInt(Rom_Sector, RID_VALVE_MAX_POS); VALVE_MIN_POS = flashReadInt(Rom_Sector, RID_VALVE_MIN_POS); - DDV_CENTER = (float) (flashReadInt(Rom_Sector, RID_DDV_CENTER)) * 0.1f; + //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); @@ -606,3 +604,4 @@ +