chenged to 2 motor velocity-closed-loop; before testing

This commit is contained in:
2025-11-20 09:50:13 +08:00
parent dd8f7c006f
commit ed09f10c03
13 changed files with 276 additions and 261 deletions

View File

@@ -1,9 +1,17 @@
#ifndef __PID_CONTROL_H
#define __PID_CONTROL_H
float PID_Controller(float Kp, float Ki, float Kd, float Error);
float _constrain(float amt, float low, float high);
struct _PID {
float Kp;
float Ki;
float Kd;
unsigned long Timestamp_Last;
float Last_Error;
float Last_intergration;
float Last_Output;
};
float PID_Controller(struct _PID *pid, float error);
float _constrain(float amt, float low, float high);
#endif