Przeglądaj źródła

Prevents MINTEMP / MAXTEMP when no heaters present

This commit checks whether or not HEATER_0 is in use, and if not, skips
the MIN / MAX temperature checks.
Richard Miles 10 lat temu
rodzic
commit
1a5293c2ce
1 zmienionych plików z 11 dodań i 9 usunięć
  1. 11
    9
      Marlin/temperature.cpp

+ 11
- 9
Marlin/temperature.cpp Wyświetl plik

@@ -1525,15 +1525,17 @@ ISR(TIMER0_COMPB_vect) {
1525 1525
     for (int i = 0; i < 4; i++) raw_temp_value[i] = 0;
1526 1526
     raw_temp_bed_value = 0;
1527 1527
 
1528
-    #ifndef HEATER_0_USES_MAX6675
1529
-      #if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
1530
-        #define GE0 <=
1531
-      #else
1532
-        #define GE0 >=
1533
-      #endif
1534
-      if (current_temperature_raw[0] GE0 maxttemp_raw[0]) max_temp_error(0);
1535
-      if (minttemp_raw[0] GE0 current_temperature_raw[0]) min_temp_error(0);
1536
-    #endif
1528
+	#if HAS_TEMP_0
1529
+		#ifndef HEATER_0_USES_MAX6675
1530
+		  #if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
1531
+			#define GE0 <=
1532
+		  #else
1533
+			#define GE0 >=
1534
+		  #endif
1535
+		  if (current_temperature_raw[0] GE0 maxttemp_raw[0]) max_temp_error(0);
1536
+		  if (minttemp_raw[0] GE0 current_temperature_raw[0]) min_temp_error(0);
1537
+		#endif
1538
+	#endif
1537 1539
 
1538 1540
     #if HAS_TEMP_1
1539 1541
       #if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP

Ładowanie…
Anuluj
Zapisz