mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Merge pull request #10165 from AnHardt/bf1_fix_Autotune_THERMAL_PROTECTION_BED_off
[1.1.x] Fix_Autotune_THERMAL_PROTECTION_BED_off
This commit is contained in:
commit
c95e3e3bcb
@ -408,7 +408,9 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
|
||||
}
|
||||
|
||||
// Did the temperature overshoot very far?
|
||||
#ifndef MAX_OVERSHOOT_PID_AUTOTUNE
|
||||
#define MAX_OVERSHOOT_PID_AUTOTUNE 20
|
||||
#endif
|
||||
if (current > target + MAX_OVERSHOOT_PID_AUTOTUNE) {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_PID_TEMP_TOO_HIGH);
|
||||
break;
|
||||
@ -424,6 +426,15 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
|
||||
|
||||
// Make sure heating is actually working
|
||||
#if WATCH_THE_BED || WATCH_HOTENDS
|
||||
if (
|
||||
#if WATCH_THE_BED && WATCH_HOTENDS
|
||||
true
|
||||
#elif WATCH_THE_BED
|
||||
hotend < 0
|
||||
#else
|
||||
hotend >= 0
|
||||
#endif
|
||||
) {
|
||||
if (!heated) { // If not yet reached target...
|
||||
if (current > next_watch_temp) { // Over the watch temp?
|
||||
next_watch_temp = current + watch_temp_increase; // - set the next temp to watch for
|
||||
@ -437,11 +448,15 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
|
||||
_temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY),
|
||||
hotend >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED)
|
||||
);
|
||||
}
|
||||
#endif
|
||||
} // every 2 seconds
|
||||
|
||||
// Timeout after 20 minutes since the last undershoot/overshoot cycle
|
||||
if (((ms - t1) + (ms - t2)) > (20L * 60L * 1000L)) {
|
||||
// Timeout after MAX_CYCLE_TIME_PID_AUTOTUNE minutes since the last undershoot/overshoot cycle
|
||||
#ifndef MAX_CYCLE_TIME_PID_AUTOTUNE
|
||||
#define MAX_CYCLE_TIME_PID_AUTOTUNE 20L
|
||||
#endif
|
||||
if (((ms - t1) + (ms - t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_PID_TIMEOUT);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user