1

Dependencies:   mcp2515 mbed-dev-f303

Revision:
6:7d2743feaf23
Parent:
5:902ba9999d6c
--- a/CONTROL/control.cpp	Tue Jan 11 13:34:14 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#include "control.h"
-
-
-void control()
-{
-    if(command_control_flag == 1)
-        command_control();
-    
-    if(return_zero == 1)
-    {
-//        gangduceshi();
-    }
-         
-    if(c_lock == 1)                                                             // 处于PC串口锁定模式
-    {
-//        cal_command.q_des_pf  = SP_pf;
-//        cal_command.qd_des_pf = 0.0f;
-//        cal_command.kp_pf     = 200.0f;
-//        cal_command.kd_pf     = 0.0f;
-//        cal_command.tau_pf_ff = 0.0f;
-//        
-//        cal_command.q_des_df  = SP_df;
-//        cal_command.qd_des_df = 0.0f;
-//        cal_command.kp_df     = 200.0f;
-//        cal_command.kd_df     = 0.0f;
-//        cal_command.tau_df_ff = 0.0f;
-    }
-    
-    if(c_lock == 0)
-    {
-        //calculate_pf_kh();
-//        calculate_pf_fuzzy();
-        
-        //calculate_df();
-    }
-    
-    // 将计算得到的数值赋给控制器
-    
-//    a_control.pf.p_des = cal_command.q_des_pf;
-//    a_control.pf.v_des = cal_command.qd_des_pf;
-//    a_control.pf.kp    = cal_command.kp_pf / 7.0f;
-//    a_control.pf.kd    = cal_command.kd_pf / 7.0f;
-//    a_control.pf.t_ff  = cal_command.tau_pf_ff / 7.0f;
-//        
-//    a_control.df.p_des = cal_command.q_des_df;
-//    a_control.df.v_des = cal_command.qd_des_df;
-//    a_control.df.kp    = cal_command.kp_df / 10.0f;
-//    a_control.df.kd    = cal_command.kd_df / 10.0f;
-//    a_control.df.t_ff  = cal_command.tau_df_ff / 10.0f;
-    
-}
-  
-    
-
-
-
-
-
-
-      
-        
-        
-
-
-