![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: CAN/function_CAN.cpp
- Revision:
- 139:15621998925b
- Parent:
- 133:22ab22818e01
- Child:
- 149:b273ae9cec75
diff -r a843f32ced33 -r 15621998925b CAN/function_CAN.cpp --- a/CAN/function_CAN.cpp Wed Oct 07 01:07:09 2020 +0000 +++ b/CAN/function_CAN.cpp Thu Oct 08 00:29:29 2020 +0000 @@ -485,7 +485,7 @@ } case CRX_SET_TORQUE_SENSOR_PULSE_PER_TORQUE: { - TORQUE_SENSOR_PULSE_PER_TORQUE = (float) ((int16_t) (msg.data[1] | msg.data[2] << 8) * 0.01f); + TORQUE_SENSOR_PULSE_PER_TORQUE = (float) ((int16_t) (msg.data[1] | msg.data[2] << 8) * 0.0001f); ROM_RESET_DATA(); //spi_eeprom_write(RID_TORQUE_SENSOR_PULSE_PER_TORQUE, (int16_t) TORQUE_SENSOR_PULSE_PER_TORQUE); @@ -1157,7 +1157,7 @@ temp_msg.id = CID_TX_INFO; temp_msg.len = 3; temp_msg.data[0] = (uint8_t) CTX_SEND_TORQUE_SENSOR_PULSE_PER_TORQUE; - int temp_torque_sensor_pulse_per_torque = (int) (TORQUE_SENSOR_PULSE_PER_TORQUE * 100.0f); + int temp_torque_sensor_pulse_per_torque = (int) (TORQUE_SENSOR_PULSE_PER_TORQUE * 10000.0f); temp_msg.data[1] = (uint8_t) temp_torque_sensor_pulse_per_torque; temp_msg.data[2] = (uint8_t) (temp_torque_sensor_pulse_per_torque >> 8);