#ifndef PID_H
#define PID_H

typedef struct {
    float kp, ki, kd;
    float integral;
    float last_error;
    float max_out;
    float max_integral;
} pid_t;

void  pid_init(pid_t *pid, float kp, float ki, float kd, float max_out, float max_i);
float pid_calc(pid_t *pid, float target, float actual);

#endif