// Comment the following line to disable PID and enable bang-bang.
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PIDTEMP
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
//#define PID_DEBUG // Sends debug data to the serial port.
#ifdef PIDTEMP
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define PID_DEBUG // Sends debug data to the serial port.
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
// If the temperature difference between the target temperature and the actual temperature
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
// If the temperature difference between the target temperature and the actual temperature
#define PID_FUNCTIONAL_RANGE 10 // degC
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define PID_FUNCTIONAL_RANGE 10 // degC
#define K1 0.95 // Smoothing factor within the PID
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define MAX_OVERSHOOT_PID_AUTOTUNE 20 // Max valor for overshoot autotune
#define K1 0.95 // Smoothing factor within the PID
#define MAX_OVERSHOOT_PID_AUTOTUNE 20 // Max valor for overshoot autotune
externintextruder_multiply[EXTRUDERS];// sets extrude multiply factor (in percent) for each extruder individually
externintextruder_multiplier[EXTRUDERS];// sets extrude multiply factor (in percent) for each extruder individually
externfloatfilament_size[EXTRUDERS];// cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
externfloatfilament_size[EXTRUDERS];// cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
externfloatvolumetric_multiplier[EXTRUDERS];// reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
externfloatvolumetric_multiplier[EXTRUDERS];// reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner