Browse Source

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 years ago
parent
commit
d86c3cf43c
3 changed files with 9 additions and 8 deletions
  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 View File

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

+ 3
- 3
Marlin/ultralcd.cpp View File

19
 int absPreheatHPBTemp;
19
 int absPreheatHPBTemp;
20
 int absPreheatFanSpeed;
20
 int absPreheatFanSpeed;
21
 
21
 
22
-boolean forced_heating_stop = false ;
22
+bool cancel_heatup = false ;
23
 
23
 
24
 #ifdef ULTIPANEL
24
 #ifdef ULTIPANEL
25
 static float manual_feedrate[] = MANUAL_FEEDRATE;
25
 static float manual_feedrate[] = MANUAL_FEEDRATE;
195
         currentMenu = lcd_main_menu;
195
         currentMenu = lcd_main_menu;
196
         encoderPosition = 0;
196
         encoderPosition = 0;
197
         lcd_quick_feedback();
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
 #ifdef ULTIPANEL_FEEDMULTIPLY
201
 #ifdef ULTIPANEL_FEEDMULTIPLY
258
     }
258
     }
259
     autotempShutdown();
259
     autotempShutdown();
260
     
260
     
261
-    forced_heating_stop = true;
261
+    cancel_heatup = true;
262
 }
262
 }
263
 
263
 
264
 /* Menu implementation */
264
 /* Menu implementation */

+ 1
- 1
Marlin/ultralcd.h View File

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

Loading…
Cancel
Save