Przeglądaj źródła

Changed the type of variable to bool, the name to "cancel_heatup", flags implementation and added this fix to M190 gcode too.

Pablo Clemente 10 lat temu
rodzic
commit
d86c3cf43c
3 zmienionych plików z 9 dodań i 8 usunięć
  1. 5
    4
      Marlin/Marlin_main.cpp
  2. 3
    3
      Marlin/ultralcd.cpp
  3. 1
    1
      Marlin/ultralcd.h

+ 5
- 4
Marlin/Marlin_main.cpp Wyświetl plik

@@ -1946,14 +1946,14 @@ void process_commands()
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 1948
       
1949
-      forced_heating_stop = false;
1949
+      cancel_heatup = false;
1950 1950
 
1951 1951
       #ifdef TEMP_RESIDENCY_TIME
1952 1952
         long residencyStart;
1953 1953
         residencyStart = -1;
1954 1954
         /* continue to loop until we have reached the target temp
1955 1955
           _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
1956
-        while((forced_heating_stop == false)&&((residencyStart == -1) ||
1956
+        while((!cancel_heatup)&&((residencyStart == -1) ||
1957 1957
               (residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL)))) ) {
1958 1958
       #else
1959 1959
         while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
@@ -2010,10 +2010,11 @@ void process_commands()
2010 2010
           CooldownNoWait = false;
2011 2011
         }
2012 2012
         codenum = millis();
2013
-
2013
+        
2014
+        cancel_heatup = false;
2014 2015
         target_direction = isHeatingBed(); // true if heating, false if cooling
2015 2016
 
2016
-        while ( target_direction ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) )
2017
+        while ( (target_direction)&&(!cancel_heatup) ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) )
2017 2018
         {
2018 2019
           if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
2019 2020
           {

+ 3
- 3
Marlin/ultralcd.cpp Wyświetl plik

@@ -19,7 +19,7 @@ int absPreheatHotendTemp;
19 19
 int absPreheatHPBTemp;
20 20
 int absPreheatFanSpeed;
21 21
 
22
-boolean forced_heating_stop = false ;
22
+bool cancel_heatup = false ;
23 23
 
24 24
 #ifdef ULTIPANEL
25 25
 static float manual_feedrate[] = MANUAL_FEEDRATE;
@@ -195,7 +195,7 @@ static void lcd_status_screen()
195 195
         currentMenu = lcd_main_menu;
196 196
         encoderPosition = 0;
197 197
         lcd_quick_feedback();
198
-        lcd_implementation_init(); // to maybe revive the LCD if static electricity killed it.
198
+        lcd_implementation_init(); // to maybe revive the LCD if static electricity killed it.
199 199
     }
200 200
 
201 201
 #ifdef ULTIPANEL_FEEDMULTIPLY
@@ -258,7 +258,7 @@ static void lcd_sdcard_stop()
258 258
     }
259 259
     autotempShutdown();
260 260
     
261
-    forced_heating_stop = true;
261
+    cancel_heatup = true;
262 262
 }
263 263
 
264 264
 /* Menu implementation */

+ 1
- 1
Marlin/ultralcd.h Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz