LIGHT2

Dependencies:   FastPWM mbed

Revision:
209:ebc69d6ee6f1
Parent:
192:637092202815
Child:
224:985dba42f261
diff -r 408f9f15c486 -r ebc69d6ee6f1 CAN/function_CAN.cpp
--- a/CAN/function_CAN.cpp	Tue Dec 22 04:55:59 2020 +0000
+++ b/CAN/function_CAN.cpp	Wed Dec 23 00:39:47 2020 +0000
@@ -789,7 +789,9 @@
 
         torq.ref = (double)temp_torq * 0.1f / TORQUE_SENSOR_PULSE_PER_TORQUE;   //N
         torq.ref_diff = torq.ref - torq.ref_old;
+        torq_dot.sen = torq.sen-totq_sen_past;
         torq.ref_old = torq.ref;
+        totq_sen_past = torq.sen;
 
         ///////////////Make Data///////////////////
         for(int i=0; i<num_array_u_past-1; i++) {