Testing Fix for Arduino 1.6+ compiler issue #1523
This commit is contained in:
parent
08bc723a3c
commit
fb75a9272d
|
@ -215,7 +215,7 @@ Here are some standard links for getting your machine calibrated:
|
|||
// If your configuration is significantly different than this and you don't understand the issues involved, you probably
|
||||
// shouldn't use bed PID until someone else verifies your hardware works.
|
||||
// If this is enabled, find your own PID constants below.
|
||||
//#define PIDTEMPBED
|
||||
#define PIDTEMPBED
|
||||
//
|
||||
//#define BED_LIMIT_SWITCHING
|
||||
|
||||
|
@ -226,17 +226,10 @@ Here are some standard links for getting your machine calibrated:
|
|||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||
|
||||
#ifdef PIDTEMPBED
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
|
||||
#define DEFAULT_bedKp 10.00
|
||||
#define DEFAULT_bedKi .023
|
||||
#define DEFAULT_bedKd 305.4
|
||||
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
//from pidautotune
|
||||
// #define DEFAULT_bedKp 97.1
|
||||
// #define DEFAULT_bedKi 1.41
|
||||
// #define DEFAULT_bedKd 1675.16
|
||||
// Felix Foil Heater
|
||||
#define DEFAULT_bedKp 103.37
|
||||
#define DEFAULT_bedKi 2.79
|
||||
#define DEFAULT_bedKd 956.94
|
||||
|
||||
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
|
||||
#endif // PIDTEMPBED
|
||||
|
@ -280,15 +273,15 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
|||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for all extruder heaters
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
|
||||
#define THERMAL_RUNAWAY_PROTECTION_PERIOD 60 //in seconds
|
||||
#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 5 // in degree Celsius
|
||||
|
||||
// If you want to enable this feature for your bed heater,
|
||||
// uncomment the 2 defines below:
|
||||
|
||||
// Parameters for the bed heater
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
|
||||
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
|
||||
#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 30 //in seconds
|
||||
#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 5// in degree Celsius
|
||||
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -527,12 +527,13 @@ void manage_heater()
|
|||
dTerm[e] = (PID_PARAM(Kd,e) * (pid_input - temp_dState[e]))*K2 + (K1 * dTerm[e]);
|
||||
pid_output = pTerm[e] + iTerm[e] - dTerm[e];
|
||||
if (pid_output > PID_MAX) {
|
||||
if (pid_error[e] > 0 ) temp_iState[e] -= pid_error[e]; // conditional un-integration
|
||||
if (pid_error[e] > 0 ) temp_iState[e] -= pid_error[e];
|
||||
pid_output=PID_MAX;
|
||||
} else if (pid_output < 0){
|
||||
if (pid_error[e] < 0 ) temp_iState[e] -= pid_error[e]; // conditional un-integration
|
||||
if (pid_error[e] < 0 ) temp_iState[e] -= pid_error[e];
|
||||
pid_output=0;
|
||||
}
|
||||
|
||||
}
|
||||
temp_dState[e] = pid_input;
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue