|
|
@ -104,12 +104,12 @@ uint8_t Temperature::soft_pwm_bed;
|
|
|
|
volatile int Temperature::babystepsTodo[XYZ] = { 0 };
|
|
|
|
volatile int Temperature::babystepsTodo[XYZ] = { 0 };
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
|
|
|
|
#if WATCH_HOTENDS
|
|
|
|
int Temperature::watch_target_temp[HOTENDS] = { 0 };
|
|
|
|
int Temperature::watch_target_temp[HOTENDS] = { 0 };
|
|
|
|
millis_t Temperature::watch_heater_next_ms[HOTENDS] = { 0 };
|
|
|
|
millis_t Temperature::watch_heater_next_ms[HOTENDS] = { 0 };
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
|
|
|
|
#if WATCH_THE_BED
|
|
|
|
int Temperature::watch_target_bed_temp = 0;
|
|
|
|
int Temperature::watch_target_bed_temp = 0;
|
|
|
|
millis_t Temperature::watch_bed_next_ms = 0;
|
|
|
|
millis_t Temperature::watch_bed_next_ms = 0;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -690,7 +690,7 @@ void Temperature::manage_heater() {
|
|
|
|
if (current_temperature[0] < max(HEATER_0_MINTEMP, MAX6675_TMIN + 0.01)) min_temp_error(0);
|
|
|
|
if (current_temperature[0] < max(HEATER_0_MINTEMP, MAX6675_TMIN + 0.01)) min_temp_error(0);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) || (ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0) || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN
|
|
|
|
#if WATCH_HOTENDS || WATCH_THE_BED || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN
|
|
|
|
millis_t ms = millis();
|
|
|
|
millis_t ms = millis();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
@ -707,7 +707,7 @@ void Temperature::manage_heater() {
|
|
|
|
soft_pwm[e] = (current_temperature[e] > minttemp[e] || is_preheating(e)) && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0;
|
|
|
|
soft_pwm[e] = (current_temperature[e] > minttemp[e] || is_preheating(e)) && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Check if the temperature is failing to increase
|
|
|
|
// Check if the temperature is failing to increase
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
|
|
|
|
#if WATCH_HOTENDS
|
|
|
|
|
|
|
|
|
|
|
|
// Is it time to check this extruder's heater?
|
|
|
|
// Is it time to check this extruder's heater?
|
|
|
|
if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) {
|
|
|
|
if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) {
|
|
|
@ -725,7 +725,7 @@ void Temperature::manage_heater() {
|
|
|
|
#endif // THERMAL_PROTECTION_HOTENDS
|
|
|
|
#endif // THERMAL_PROTECTION_HOTENDS
|
|
|
|
|
|
|
|
|
|
|
|
// Check if the temperature is failing to increase
|
|
|
|
// Check if the temperature is failing to increase
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
|
|
|
|
#if WATCH_THE_BED
|
|
|
|
|
|
|
|
|
|
|
|
// Is it time to check the bed?
|
|
|
|
// Is it time to check the bed?
|
|
|
|
if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) {
|
|
|
|
if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) {
|
|
|
@ -1157,7 +1157,7 @@ void Temperature::init() {
|
|
|
|
#endif //BED_MAXTEMP
|
|
|
|
#endif //BED_MAXTEMP
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
|
|
|
|
#if WATCH_HOTENDS
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Start Heating Sanity Check for hotends that are below
|
|
|
|
* Start Heating Sanity Check for hotends that are below
|
|
|
|
* their target temperature by a configurable margin.
|
|
|
|
* their target temperature by a configurable margin.
|
|
|
@ -1176,7 +1176,7 @@ void Temperature::init() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
|
|
|
|
#if WATCH_THE_BED
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Start Heating Sanity Check for hotends that are below
|
|
|
|
* Start Heating Sanity Check for hotends that are below
|
|
|
|
* their target temperature by a configurable margin.
|
|
|
|
* their target temperature by a configurable margin.
|
|
|
|