This commit is contained in:
Mike Trudeau
2026-02-13 20:30:52 +00:00
parent 71ffec0d88
commit 5b106896a1
127 changed files with 35217 additions and 0 deletions

18
fw/stm8s/ebake1/pid.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef PID_H
#define PID_H
#include <stdint.h>
typedef struct {
int8_t dstate; //last position input
int8_t istate; //integrator state
int8_t imax, imin; //integratir limits
int8_t vmax,vmin; //result limits
int8_t pgain, igain, dgain;
} pid_struct;
int8_t update_pid(pid_struct *pid, int8_t error, uint8_t position);
int8_t pid_guard(uint16_t desired, uint16_t current);
#endif /* PID_H */