Kim GiJeong
/
HydraulicControlBoard_LIGHT_GJ
eeprom_test
Diff: CAN/function_CAN.cpp
- Revision:
- 63:a3c7f31742c9
- Parent:
- 62:851cf7b7aa7a
- Child:
- 67:cfc88fd0591e
--- a/CAN/function_CAN.cpp Tue May 12 06:23:22 2020 +0000 +++ b/CAN/function_CAN.cpp Fri May 15 03:25:15 2020 +0000 @@ -378,7 +378,7 @@ case CRX_SET_PISTON_AREA: { PISTON_AREA_A = (int16_t) (msg.data[1] | msg.data[2] << 8); PISTON_AREA_B = (int16_t) (msg.data[3] | msg.data[4] << 8); - PISTON_AREA_alpha = (double)PISTON_AREA_B/(double)PISTON_AREA_A; + PISTON_AREA_alpha = (double)PISTON_AREA_A/(double)PISTON_AREA_B; alpha3 = PISTON_AREA_alpha * PISTON_AREA_alpha*PISTON_AREA_alpha; ROM_RESET_DATA(); @@ -720,7 +720,7 @@ vel.ref = (double)temp_vel * 256.0f; } - torq.ref = (double)temp_torq * 0.1f; + torq.ref = (double)temp_torq * 0.1f /(float)(TORQUE_SENSOR_PULSE_PER_TORQUE); } else if(address==CID_RX_REF_VALVE_POS) { int16_t temp_ref_valve_pos = (int16_t) (msg.data[0] | msg.data[1] << 8);