1

Dependencies:   mcp2515 mbed-dev-f303

Files at this revision

API Documentation at this revision

Comitter:
yezhong
Date:
Fri Jun 24 01:24:33 2022 +0000
Parent:
7:0db41afbdb3b
Commit message:
1

Changed in this revision

CONTROL/control.cpp Show annotated file Show diff for this revision Revisions of this file
CONTROL/control.h Show annotated file Show diff for this revision Revisions of this file
--- a/CONTROL/control.cpp	Fri Jun 24 01:22:44 2022 +0000
+++ b/CONTROL/control.cpp	Fri Jun 24 01:24:33 2022 +0000
@@ -1,60 +1,3 @@
-#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;
-    
-}
-  
-    
-
-
-
-
 
 
       
--- a/CONTROL/control.h	Fri Jun 24 01:22:44 2022 +0000
+++ b/CONTROL/control.h	Fri Jun 24 01:24:33 2022 +0000
@@ -1,20 +1,1 @@
-#ifndef _CONTROL_H
-#define _CONTROL_H
 
-
-#include "mbed.h"
-#include "CAN.h"
-#include "mode.h"
-#include "data_command.h"
-#include "data_board.h"
-#include "used_leg_message.h"
-
-
-
-
-void control();
-
-
-
-
-#endif