2011

Dependencies:   mbed FastPWM

Revision:
32:4b8c0fedaf2c
Parent:
30:8d561f16383b
Child:
33:91b17819ec30
diff -r 66738bfecec5 -r 4b8c0fedaf2c CAN/function_CAN.cpp
--- a/CAN/function_CAN.cpp	Tue Oct 08 07:15:05 2019 +0000
+++ b/CAN/function_CAN.cpp	Mon Nov 11 09:48:00 2019 +0000
@@ -640,6 +640,12 @@
             ROM_RESET_DATA();
             break;
         }
+        case CRX_SET_VALVE_CENTER_OFFSET: {
+            VALVE_CENTER_OFFSET_times10 = (int16_t) (msg.data[1] | msg.data[2] << 8);
+            VALVE_CENTER_OFFSET = VALVE_CENTER_OFFSET_times10 * 0.1f;
+            ROM_RESET_DATA();
+            break;
+        }
     default:
         break;
     }
@@ -653,7 +659,6 @@
     if(address==CID_RX_CMD){
         unsigned int CMD = msg.data[0];
         ReadCMD(CMD);
-        pc.printf("cmd %d\n ",CMD);
     } else if(address==CID_RX_REF_POSITION) {
         int32_t temp_pos = (int32_t) (msg.data[0] | msg.data[1] << 8 | msg.data[2] << 16 | msg.data[3] << 24);
         int32_t temp_vel = (int32_t) (msg.data[4] | msg.data[5] << 8 | msg.data[6] << 16 | msg.data[7] << 24);
@@ -1259,3 +1264,4 @@
 }
 
 
+