add missing files

This commit is contained in:
2021-02-24 18:31:43 +01:00
parent c9d5f33a0b
commit 92f31a1849
4 changed files with 99 additions and 0 deletions

14
pid.h Normal file
View File

@@ -0,0 +1,14 @@
struct pid{
// Controller gains
float kP;
float kI;
float kD;
// State variables
float lastError;
float integral;
};
float pid_step(volatile struct pid* controller, float dt, float error);
void init_pid(volatile struct pid* controller, float p, float i, float d);