添加文件1和文件2
This commit is contained in:
22
Mecanum Wheel moving project 1/Core/Inc/pid.h
Normal file
22
Mecanum Wheel moving project 1/Core/Inc/pid.h
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
#ifndef __PID_H
|
||||
#define __PID_H
|
||||
#include "main.h"
|
||||
|
||||
typedef struct {
|
||||
float kp; // ????
|
||||
float ki; // ????
|
||||
float kd; // ????
|
||||
float integral; // ???
|
||||
float prev_error; // ?????
|
||||
float output; // ???
|
||||
float integral_limit; // ????
|
||||
float output_limit; // ????
|
||||
} PID_Controller_t;
|
||||
|
||||
extern void PID_Init(PID_Controller_t* pid, float kp, float ki, float kd, float integral_limit, float output_limit);
|
||||
extern float PID_Calculate(PID_Controller_t* pid, float error, float dt);
|
||||
extern void Motor_PID_Init();
|
||||
extern void PID_PositionClean(PID_Controller_t* pid);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user