Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: CAN/function_CAN.cpp
- Revision:
- 60:64181f1d3e60
- Parent:
- 57:f4819de54e7a
- Child:
- 66:a8e6799dbce3
--- a/CAN/function_CAN.cpp Mon Mar 16 04:50:54 2020 +0000
+++ b/CAN/function_CAN.cpp Tue Mar 31 05:12:37 2020 +0000
@@ -1339,13 +1339,15 @@
can.write(temp_msg);
}
-void CAN_TX_TORQUE(int16_t t_valve_pos) {
+void CAN_TX_TORQUE(int16_t t_valve_pos, int16_t t_vout) {
CANMessage temp_msg;
temp_msg.id = CID_TX_TORQUE;
- temp_msg.len = 2;
+ temp_msg.len = 4;
temp_msg.data[0] = (uint8_t) t_valve_pos;
temp_msg.data[1] = (uint8_t) (t_valve_pos >> 8);
+ temp_msg.data[2] = (uint8_t) t_vout;
+ temp_msg.data[3] = (uint8_t) (t_vout >> 8);
can.write(temp_msg);
}