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