Sungwoo Kim
/
HydraulicControlBoard_PostLIGHT_210420
LIGHT2
Diff: CAN/function_CAN.cpp
- Revision:
- 251:91d3ec3a087e
- Parent:
- 249:544011ad9c85
- Child:
- 252:a08f301231f1
diff -r f69cd0553be0 -r 91d3ec3a087e CAN/function_CAN.cpp --- a/CAN/function_CAN.cpp Wed Jun 29 00:19:21 2022 +0000 +++ b/CAN/function_CAN.cpp Fri Jul 01 05:37:08 2022 +0000 @@ -732,10 +732,10 @@ valve_pos.ref = (double) temp_ref_valve_pos; // Unit : pulse (0~30000) } else { //SW Valve if(temp_ref_valve_pos >= 0) { - valve_pos.ref = (double)VALVE_ELECTRIC_CENTER + (double)temp_ref_valve_pos * ((double)VALVE_MAX_POS-(double)VALVE_ELECTRIC_CENTER)/10000.0f; + valve_pos.ref = (double)VALVE_DEADZONE_PLUS + (double)temp_ref_valve_pos * ((double)VALVE_MAX_POS-(double)VALVE_DEADZONE_PLUS)/10000.0f; // valve_pos.ref = (double)temp_ref_valve_pos; } else { - valve_pos.ref = (double)VALVE_ELECTRIC_CENTER - (double)temp_ref_valve_pos * ((double)VALVE_MIN_POS-(double)VALVE_ELECTRIC_CENTER)/10000.0f; + valve_pos.ref = (double)VALVE_DEADZONE_MINUS - (double)temp_ref_valve_pos * ((double)VALVE_MIN_POS-(double)VALVE_DEADZONE_MINUS)/10000.0f; // valve_pos.ref = (double)temp_ref_valve_pos; } }