diff --git a/inc/pid.h b/inc/pid.h new file mode 100644 --- /dev/null +++ b/inc/pid.h @@ -0,0 +1,16 @@ +#ifndef PIDS_H +#define PIDS_H + +#include "stm32f3xx_hal.h" +#include "states.h" + +typedef struct { + int16_t last_pid_temp; + uint8_t last_pid_temp_frac; + int32_t i_state; +} pid_state_t; + +void pid_init(pid_state_t* state); +int16_t pid_update(therm_settings_t* set, therm_status_t* status, pid_state_t* state); + +#endif