Browse Source

Activate BED_MINTEMP error.

And call _temp_error() directly for ERR_MAXTEMP_BED to avoid the only one time use of bed_max_temp_error().

Includes #2156.
AnHardt 10 years ago
parent
commit
da246f5cb1
2 changed files with 8 additions and 7 deletions
  1. 3
    0
      Marlin/language_en.h
  2. 5
    7
      Marlin/temperature.cpp

+ 3
- 0
Marlin/language_en.h View File

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

+ 5
- 7
Marlin/temperature.cpp View File

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);
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
 static int minttemp[EXTRUDERS] = { 0 };
152
 static int minttemp[EXTRUDERS] = { 0 };
153
 static int maxttemp[EXTRUDERS] = ARRAY_BY_EXTRUDERS( 16383, 16383, 16383, 16383 );
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
 #ifdef BED_MAXTEMP
157
 #ifdef BED_MAXTEMP
156
   static int bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP;
158
   static int bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP;
157
 #endif
159
 #endif
472
 void min_temp_error(uint8_t e) {
474
 void min_temp_error(uint8_t e) {
473
   _temp_error(e, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP));
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
 float get_pid_output(int e) {
478
 float get_pid_output(int e) {
480
   float pid_output;
479
   float pid_output;
977
   #endif // EXTRUDERS > 1
976
   #endif // EXTRUDERS > 1
978
 
977
 
979
   #ifdef BED_MINTEMP
978
   #ifdef BED_MINTEMP
980
-    /* No bed MINTEMP error implemented?!? */ /*
981
     while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
979
     while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
982
       #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
980
       #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
983
         bed_minttemp_raw += OVERSAMPLENR;
981
         bed_minttemp_raw += OVERSAMPLENR;
985
         bed_minttemp_raw -= OVERSAMPLENR;
983
         bed_minttemp_raw -= OVERSAMPLENR;
986
       #endif
984
       #endif
987
     }
985
     }
988
-    */
989
   #endif //BED_MINTEMP
986
   #endif //BED_MINTEMP
990
   #ifdef BED_MAXTEMP
987
   #ifdef BED_MAXTEMP
991
     while(analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
988
     while(analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
1581
       #else
1578
       #else
1582
         #define GEBED >=
1579
         #define GEBED >=
1583
       #endif
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
     #endif
1583
     #endif
1586
 
1584
 
1587
   } // temp_count >= OVERSAMPLENR
1585
   } // temp_count >= OVERSAMPLENR

Loading…
Cancel
Save