Browse Source

Fixed stop print LCD function on M104

Pablo Clemente 10 years ago
parent
commit
86b4b805d2
3 changed files with 9 additions and 2 deletions
  1. 4
    2
      Marlin/Marlin_main.cpp
  2. 3
    0
      Marlin/ultralcd.cpp
  3. 2
    0
      Marlin/ultralcd.h

+ 4
- 2
Marlin/Marlin_main.cpp View File

@@ -1945,14 +1945,16 @@ void process_commands()
1945 1945
 
1946 1946
       /* See if we are heating up or cooling down */
1947 1947
       target_direction = isHeatingHotend(tmp_extruder); // true if heating, false if cooling
1948
+      
1949
+      forced_heating_stop = true;
1948 1950
 
1949 1951
       #ifdef TEMP_RESIDENCY_TIME
1950 1952
         long residencyStart;
1951 1953
         residencyStart = -1;
1952 1954
         /* continue to loop until we have reached the target temp
1953 1955
           _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
1954
-        while((residencyStart == -1) ||
1955
-              (residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL))) ) {
1956
+        while((forced_heating_stop == true)&&((residencyStart == -1) ||
1957
+              (residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL)))) ) {
1956 1958
       #else
1957 1959
         while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
1958 1960
       #endif //TEMP_RESIDENCY_TIME

+ 3
- 0
Marlin/ultralcd.cpp View File

@@ -19,6 +19,7 @@ int absPreheatHotendTemp;
19 19
 int absPreheatHPBTemp;
20 20
 int absPreheatFanSpeed;
21 21
 
22
+boolean forced_heating_stop = true ;
22 23
 
23 24
 #ifdef ULTIPANEL
24 25
 static float manual_feedrate[] = MANUAL_FEEDRATE;
@@ -256,6 +257,8 @@ static void lcd_sdcard_stop()
256 257
         enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
257 258
     }
258 259
     autotempShutdown();
260
+    
261
+    forced_heating_stop = false;
259 262
 }
260 263
 
261 264
 /* Menu implementation */

+ 2
- 0
Marlin/ultralcd.h View File

@@ -42,6 +42,8 @@
42 42
   extern int absPreheatHotendTemp;
43 43
   extern int absPreheatHPBTemp;
44 44
   extern int absPreheatFanSpeed;
45
+  
46
+  extern boolean forced_heating_stop;
45 47
     
46 48
   void lcd_buzz(long duration,uint16_t freq);
47 49
   bool lcd_clicked();

Loading…
Cancel
Save