hobbyking_cheetah source code modified 2020/12/15

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
55:71a6e5fe5805
Parent:
48:74a40481740c
diff -r 59575833d16f -r 71a6e5fe5805 structs.h
--- a/structs.h	Thu Aug 08 17:39:43 2019 +0000
+++ b/structs.h	Tue Dec 15 07:28:27 2020 +0000
@@ -4,6 +4,12 @@
 #include "mbed.h"
 #include "FastPWM.h"
 
+/* -----
+移除速度控制,把位置控制改成PID
+
+log file:
+11/05: 在ControllerStruct新增ki(desired KI),保留v_des(desired velocity)
+----- */
 
 typedef struct{
     DigitalOut *enable;
@@ -33,7 +39,7 @@
     int timeout;                                            // Watchdog counter
     int mode;
     int ovp_flag;                                           // Over-voltage flag
-    float p_des, v_des, kp, kd, t_ff;                       // Desired position, velocity, gians, torque
+    float p_des, v_des, kp, ki, kd, t_ff;                       // Desired position, velocity, gians, torque
     float v_ref, fw_int;                                     // output voltage magnitude, field-weakening integral
     float cogging[128];
     } ControllerStruct;