Merge pull request #5082 from Fulg/RCBugFix
Only issue MAXTEMP when heating
This commit is contained in:
commit
208d720614
1 changed files with 2 additions and 2 deletions
|
@ -1809,7 +1809,7 @@ void Temperature::isr() {
|
||||||
|
|
||||||
for (uint8_t e = 0; e < COUNT(temp_dir); e++) {
|
for (uint8_t e = 0; e < COUNT(temp_dir); e++) {
|
||||||
const int tdir = temp_dir[e], rawtemp = current_temperature_raw[e] * tdir;
|
const int tdir = temp_dir[e], rawtemp = current_temperature_raw[e] * tdir;
|
||||||
if (rawtemp > maxttemp_raw[e] * tdir) max_temp_error(e);
|
if (rawtemp > maxttemp_raw[e] * tdir && target_temperature[e] > 0.0f) max_temp_error(e);
|
||||||
if (rawtemp < minttemp_raw[e] * tdir && !is_preheating(e) && target_temperature[e] > 0.0f) {
|
if (rawtemp < minttemp_raw[e] * tdir && !is_preheating(e) && target_temperature[e] > 0.0f) {
|
||||||
#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
|
#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
|
||||||
if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED)
|
if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED)
|
||||||
|
@ -1828,7 +1828,7 @@ void Temperature::isr() {
|
||||||
#else
|
#else
|
||||||
#define GEBED >=
|
#define GEBED >=
|
||||||
#endif
|
#endif
|
||||||
if (current_temperature_bed_raw GEBED bed_maxttemp_raw) max_temp_error(-1);
|
if (current_temperature_bed_raw GEBED bed_maxttemp_raw && target_temperature_bed > 0.0f) max_temp_error(-1);
|
||||||
if (bed_minttemp_raw GEBED current_temperature_bed_raw && target_temperature_bed > 0.0f) min_temp_error(-1);
|
if (bed_minttemp_raw GEBED current_temperature_bed_raw && target_temperature_bed > 0.0f) min_temp_error(-1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Reference in a new issue