Merge pull request #5082 from Fulg/RCBugFix

Only issue MAXTEMP when heating
This commit is contained in:
Scott Lahteine 2016-10-26 05:55:33 -05:00 committed by GitHub
commit 208d720614

View file

@ -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