2 * Based on https://github.com/br3ttb/Arduino-PID-AutoTune-Library
5 #ifndef _PID_AUTOTUNE_H
6 #define _PID_AUTOTUNE_H
11 #include "TemperatureControl.h"
12 #include "StreamOutput.h"
14 class PID_Autotuner
: public Module
18 void begin(TemperatureControl
*, double, StreamOutput
*, int cycles
= 8);
21 void on_module_loaded(void);
22 uint32_t on_tick(uint32_t);
24 void on_gcode_received(void *);
29 TemperatureControl
*t
;
30 float target_temperature
;
38 unsigned long peak1
, peak2
;
49 unsigned long tickCnt
;
52 #endif /* _PID_AUTOTUNE_H */