|
@@ -1722,14 +1722,12 @@ void Temperature::readings_ready() {
|
1722
|
1722
|
|
1723
|
1723
|
for (uint8_t e = 0; e < COUNT(temp_dir); e++) {
|
1724
|
1724
|
const int16_t tdir = temp_dir[e], rawtemp = current_temperature_raw[e] * tdir;
|
1725
|
|
- const bool heater_on = 0 <
|
|
1725
|
+ const bool heater_on = (target_temperature[e] > 0)
|
1726
|
1726
|
#if ENABLED(PIDTEMP)
|
1727
|
|
- soft_pwm_amount[e]
|
1728
|
|
- #else
|
1729
|
|
- target_temperature[e]
|
|
1727
|
+ || (soft_pwm_amount[e] > 0)
|
1730
|
1728
|
#endif
|
1731
|
1729
|
;
|
1732
|
|
- if (rawtemp > maxttemp_raw[e] * tdir && heater_on) max_temp_error(e);
|
|
1730
|
+ if (rawtemp > maxttemp_raw[e] * tdir) max_temp_error(e);
|
1733
|
1731
|
if (rawtemp < minttemp_raw[e] * tdir && !is_preheating(e) && heater_on) {
|
1734
|
1732
|
#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
|
1735
|
1733
|
if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED)
|
|
@@ -1748,14 +1746,12 @@ void Temperature::readings_ready() {
|
1748
|
1746
|
#else
|
1749
|
1747
|
#define GEBED >=
|
1750
|
1748
|
#endif
|
1751
|
|
- const bool bed_on = 0 <
|
|
1749
|
+ const bool bed_on = (target_temperature_bed > 0)
|
1752
|
1750
|
#if ENABLED(PIDTEMPBED)
|
1753
|
|
- soft_pwm_amount_bed
|
1754
|
|
- #else
|
1755
|
|
- target_temperature_bed
|
|
1751
|
+ || (soft_pwm_amount_bed > 0)
|
1756
|
1752
|
#endif
|
1757
|
1753
|
;
|
1758
|
|
- if (current_temperature_bed_raw GEBED bed_maxttemp_raw && bed_on) max_temp_error(-1);
|
|
1754
|
+ if (current_temperature_bed_raw GEBED bed_maxttemp_raw) max_temp_error(-1);
|
1759
|
1755
|
if (bed_minttemp_raw GEBED current_temperature_bed_raw && bed_on) min_temp_error(-1);
|
1760
|
1756
|
#endif
|
1761
|
1757
|
}
|