111

Dependencies:   yezhong_main_controller_copy mbed1-dev

Revision:
4:3f7a59212142
Parent:
3:940a9e40d327
Child:
9:c082f1c52936
--- a/main.cpp	Wed Jun 30 12:15:37 2021 +0000
+++ b/main.cpp	Mon Jun 13 12:25:22 2022 +0000
@@ -31,24 +31,24 @@
 //   command.attach(&serial_command_isr);
 
     
-    pf_can.frequency(1000000);
+    pf_can.frequency(800000);
     pf_can.filter(CAN_ID<<21, 0xFFE00004, CANStandard, 0);
     pf_rxMsg.len = 6;
     PF_can.len   = 8;
-    PF_can.id    = 0x03;
+    PF_can.id    = 0x02;
     
-    df_can.frequency(1000000);
+    df_can.frequency(800000);
     df_can.filter(CAN_ID<<21, 0xFFE00004, CANStandard, 0);
     df_rxMsg.len = 6;
     DF_can.len   = 8;
-    DF_can.id    = 0x03;
+    DF_can.id    = 0x02;
     
 /////////////////////////////////////position///////////////////////////////////////////
-    wait(2);
+    wait(6);
       Zero(&PF_can);
-      Zero(&DF_can);
+      Zero(&DF_can);//0位置
     EnterMotorMode(&PF_can);
-    EnterMotorMode(&DF_can);
+    EnterMotorMode(&DF_can);//电机模式
     
 /*
     a_control.pf.p_des=PI/8;
@@ -155,7 +155,7 @@
         a_control.pf.t_ff=0;
 
         a_control.df.p_des=0;
-        a_control.df.v_des=-100*2*3.14/60/49;
+        a_control.df.v_des=500*2*3.14/60/49;//49减速比,
         a_control.df.kp=0;
         a_control.df.kd=5;
         a_control.df.t_ff=0;