Kaynağa Gözat

Merge pull request #2157 from AnHardt/bed-mintemp

Activate BED_MINTEMP error
Scott Lahteine 10 yıl önce
ebeveyn
işleme
22c8bc5ef4
2 değiştirilmiş dosya ile 8 ekleme ve 7 silme
  1. 3
    0
      Marlin/language_en.h
  2. 5
    7
      Marlin/temperature.cpp

+ 3
- 0
Marlin/language_en.h Dosyayı Görüntüle

@@ -417,6 +417,9 @@
417 417
 #ifndef MSG_ERR_MAXTEMP_BED
418 418
 #define MSG_ERR_MAXTEMP_BED                 "Err: MAXTEMP BED"
419 419
 #endif
420
+#ifndef MSG_ERR_MINTEMP_BED
421
+#define MSG_ERR_MINTEMP_BED                 "Err: MINTEMP BED"
422
+#endif
420 423
 #ifndef MSG_END_HOUR
421 424
 #define MSG_END_HOUR                        "hours"
422 425
 #endif

+ 5
- 7
Marlin/temperature.cpp Dosyayı Görüntüle

@@ -151,7 +151,9 @@ static int minttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( HEATER_0_RAW_LO_TEMP ,
151 151
 static int maxttemp_raw[EXTRUDERS] = ARRAY_BY_EXTRUDERS( HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP);
152 152
 static int minttemp[EXTRUDERS] = { 0 };
153 153
 static int maxttemp[EXTRUDERS] = ARRAY_BY_EXTRUDERS( 16383, 16383, 16383, 16383 );
154
-//static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; /* No bed mintemp error implemented?!? */
154
+#ifdef BED_MINTEMP
155
+static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP;
156
+#endif
155 157
 #ifdef BED_MAXTEMP
156 158
   static int bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP;
157 159
 #endif
@@ -472,9 +474,6 @@ void max_temp_error(uint8_t e) {
472 474
 void min_temp_error(uint8_t e) {
473 475
   _temp_error(e, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP));
474 476
 }
475
-void bed_max_temp_error(void) {
476
-  _temp_error(-1, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP_BED));
477
-}
478 477
 
479 478
 float get_pid_output(int e) {
480 479
   float pid_output;
@@ -977,7 +976,6 @@ void tp_init() {
977 976
   #endif // EXTRUDERS > 1
978 977
 
979 978
   #ifdef BED_MINTEMP
980
-    /* No bed MINTEMP error implemented?!? */ /*
981 979
     while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
982 980
       #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
983 981
         bed_minttemp_raw += OVERSAMPLENR;
@@ -985,7 +983,6 @@ void tp_init() {
985 983
         bed_minttemp_raw -= OVERSAMPLENR;
986 984
       #endif
987 985
     }
988
-    */
989 986
   #endif //BED_MINTEMP
990 987
   #ifdef BED_MAXTEMP
991 988
     while(analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
@@ -1581,7 +1578,8 @@ ISR(TIMER0_COMPB_vect) {
1581 1578
       #else
1582 1579
         #define GEBED >=
1583 1580
       #endif
1584
-      if (current_temperature_bed_raw GEBED bed_maxttemp_raw) bed_max_temp_error();
1581
+      if (current_temperature_bed_raw GEBED bed_maxttemp_raw) _temp_error(-1, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP_BED));
1582
+      if (bed_minttemp_raw GEBED current_temperature_bed_raw) _temp_error(-1, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP_BED));
1585 1583
     #endif
1586 1584
 
1587 1585
   } // temp_count >= OVERSAMPLENR

Loading…
İptal
Kaydet