![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
2011
Diff: CAN/function_CAN.cpp
- Revision:
- 238:91d3ec3a087e
- Parent:
- 236:544011ad9c85
- Child:
- 239: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; } }