asdgas

Dependencies:   mbed Eigen FastPWM

Revision:
60:64181f1d3e60
Parent:
57:f4819de54e7a
Child:
62:456f87e3124e
--- 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);
 }