Add PID controller to oven driver module
This commit is contained in:
@@ -22,6 +22,16 @@
|
||||
#define __OVEN_DRIVER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <reflow-controller/pid-controller.h>
|
||||
|
||||
struct oven_pid_status {
|
||||
bool active;
|
||||
bool aborted;
|
||||
float target_temp;
|
||||
float current_temp;
|
||||
uint64_t timestamp_last_run;
|
||||
};
|
||||
|
||||
void oven_driver_init(void);
|
||||
|
||||
@@ -29,4 +39,14 @@ void oven_driver_set_power(uint8_t power);
|
||||
|
||||
void oven_driver_disable(void);
|
||||
|
||||
void oven_pid_init(struct pid_controller *controller_to_copy);
|
||||
|
||||
void oven_pid_handle(float target_temp, float current_temp);
|
||||
|
||||
void oven_pid_stop();
|
||||
|
||||
void oven_pid_report_error(void);
|
||||
|
||||
const struct oven_pid_status *oven_pid_get_status(void);
|
||||
|
||||
#endif /* __OVEN_DRIVER_H__ */
|
||||
|
@@ -45,4 +45,6 @@ float pid_sample(struct pid_controller *pid, float deviation);
|
||||
|
||||
float pid_get_control_output(const struct pid_controller *pid);
|
||||
|
||||
int pid_copy(struct pid_controller *dest, const struct pid_controller *src);
|
||||
|
||||
#endif /* __PID_CONTROLLER_H__ */
|
||||
|
Reference in New Issue
Block a user