Sungwoo Kim
/
HydraulicControlBoard_PostLIGHT_210420
LIGHT2
Diff: CAN/function_CAN.cpp
- Revision:
- 72:3436ce769b1e
- Parent:
- 69:3995ffeaa786
- Child:
- 73:f80dc3970c99
diff -r 381188d044f4 -r 3436ce769b1e CAN/function_CAN.cpp --- a/CAN/function_CAN.cpp Mon May 18 01:47:33 2020 +0000 +++ b/CAN/function_CAN.cpp Tue May 19 01:36:27 2020 +0000 @@ -271,6 +271,12 @@ D_DAMPER = (float) (((float) ((int16_t) (msg.data[4] | msg.data[5] << 8))) * 0.01f); // ROM_RESET_DATA(); //For Real-time changing + } else if (msg.data[1] == 4) { + P_GAIN_JOINT_TORQUE_FF = (int16_t) (msg.data[2] | msg.data[3] << 8); + I_GAIN_JOINT_TORQUE_FF = (int16_t) (msg.data[4] | msg.data[5] << 8); + D_GAIN_JOINT_TORQUE_FF = (int16_t) (msg.data[6] | msg.data[7] << 8); + + ROM_RESET_DATA(); } break; @@ -755,7 +761,7 @@ input[ind] = x_past[2*i] / 60.0f; ind = ind + 1; } - input[ind] = pos.sen / ENC_PULSE_PER_POSITION / 60.0f; + input[ind] = (pos.sen / ENC_PULSE_PER_POSITION) / 60.0f; ind = ind + 1; for(int i=0;i<numpast_f;i++){ input[ind] = f_past[2*i] / 10000.0f + 0.5f;