111

Dependencies:   yezhong_main_controller_copy mbed1-dev

Revision:
7:d1b09098579b
Parent:
6:902ba9999d6c
Child:
8:1ab9699af5ae
--- a/main.cpp	Tue Jan 11 13:34:14 2022 +0000
+++ b/main.cpp	Tue Feb 22 14:26:28 2022 +0000
@@ -10,6 +10,7 @@
 #include "data_command.h"
 #include "Moving_Average.h"
 
+
 #include "CAN3.h"
 #include "mcp2515.h"
 #include <sstream>
@@ -30,16 +31,17 @@
    
     
 ////////////////////////初始化//////////////////////////////////////
-    pc.baud(115200);                                           //串口打印信息
+    pc.baud(115200);                                           //串口打印信息  U2
     pc.attach(&serial_pc_isr);
 
-//  foot.baud(115200);                                          //接收鞋垫信息
-//  foot.attach(&serial_board_isr);
+    //foot.baud(115200);                                          //接收鞋垫信息   U1
+   // foot.attach(&serial_board_isr);
 
-//   command.baud(115200);                                      //485通信
+//   command.baud(115200);                                      //485通信     U3
 //   command.attach(&serial_command_isr);
 
-    
+     zitai_foot.baud(115200);                                      //U4
+     zitai_foot.attach(&serial_zitai_foot_isr);
      
     
     pf_can.frequency(800000);
@@ -59,6 +61,11 @@
     df1_txMsg.id =0x03;
     df1_can.frequency(800000);
     
+    NVIC_SetPriority(USART1_IRQn, 1);                                           // command中断优先级高于board
+    //NVIC_SetPriority(USART3_IRQn, 3);
+    
+    
+    
 /////////////////////////////////////position///////////////////////////////////////////
     wait(8);
      Zero(&pf_txMsg);
@@ -115,7 +122,7 @@
        La_df_real = LaLi_df.read();
        La_df1_real = LaLi_df1.read();
 
-        pc.printf("%.3fa%.3f\r\n",F_pf,pfp);     //拉力
+        //pc.printf("%.3fa%.3f\r\n",F_pf,pfp);     //拉力
          
                
         //pc.printf("%.3f\r\n",dfp);