Browse Source

Change cancel_heatup to wait_for_heatup

Scott Lahteine 8 years ago
parent
commit
160a2be117
3 changed files with 9 additions and 11 deletions
  1. 7
    9
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/ultralcd.cpp
  3. 1
    1
      Marlin/ultralcd.h

+ 7
- 9
Marlin/Marlin_main.cpp View File

@@ -332,7 +332,7 @@ uint8_t active_extruder = 0;
332 332
 // Relative Mode. Enable with G91, disable with G90.
333 333
 static bool relative_mode = false;
334 334
 
335
-bool cancel_heatup = false;
335
+bool wait_for_heatup = true;
336 336
 
337 337
 const char errormagic[] PROGMEM = "Error:";
338 338
 const char echomagic[] PROGMEM = "echo:";
@@ -1107,7 +1107,7 @@ inline void get_serial_commands() {
1107 1107
 
1108 1108
       // If command was e-stop process now
1109 1109
       if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
1110
-      if (strcmp(command, "M108") == 0) cancel_heatup = true;
1110
+      if (strcmp(command, "M108") == 0) wait_for_heatup = false;
1111 1111
 
1112 1112
       #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
1113 1113
         last_command_time = ms;
@@ -4520,9 +4520,7 @@ inline void gcode_M105() {
4520 4520
 /**
4521 4521
  * M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
4522 4522
  */
4523
-inline void gcode_M108() {
4524
-  cancel_heatup = true;
4525
-}
4523
+inline void gcode_M108() { wait_for_heatup = false; }
4526 4524
 
4527 4525
 /**
4528 4526
  * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
@@ -4582,7 +4580,7 @@ inline void gcode_M109() {
4582 4580
 
4583 4581
   float theTarget = -1.0, old_temp = 9999.0;
4584 4582
   bool wants_to_cool = false;
4585
-  cancel_heatup = false;
4583
+  wait_for_heatup = true;
4586 4584
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4587 4585
 
4588 4586
   KEEPALIVE_STATE(NOT_BUSY);
@@ -4646,7 +4644,7 @@ inline void gcode_M109() {
4646 4644
       }
4647 4645
     }
4648 4646
 
4649
-  } while (!cancel_heatup && TEMP_CONDITIONS);
4647
+  } while (wait_for_heatup && TEMP_CONDITIONS);
4650 4648
 
4651 4649
   LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
4652 4650
   KEEPALIVE_STATE(IN_HANDLER);
@@ -4676,7 +4674,7 @@ inline void gcode_M109() {
4676 4674
 
4677 4675
     float theTarget = -1.0, old_temp = 9999.0;
4678 4676
     bool wants_to_cool = false;
4679
-    cancel_heatup = false;
4677
+    wait_for_heatup = true;
4680 4678
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4681 4679
 
4682 4680
     KEEPALIVE_STATE(NOT_BUSY);
@@ -4740,7 +4738,7 @@ inline void gcode_M109() {
4740 4738
         }
4741 4739
       }
4742 4740
 
4743
-    } while (!cancel_heatup && TEMP_BED_CONDITIONS);
4741
+    } while (wait_for_heatup && TEMP_BED_CONDITIONS);
4744 4742
 
4745 4743
     LCD_MESSAGEPGM(MSG_BED_DONE);
4746 4744
     KEEPALIVE_STATE(IN_HANDLER);

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -559,7 +559,7 @@ static void lcd_status_screen() {
559 559
       stepper.quick_stop();
560 560
       print_job_timer.stop();
561 561
       thermalManager.autotempShutdown();
562
-      cancel_heatup = true;
562
+      wait_for_heatup = false;
563 563
       lcd_setstatus(MSG_PRINT_ABORTED, true);
564 564
       #if DISABLED(DELTA) && DISABLED(SCARA)
565 565
         set_current_position_from_planner();

+ 1
- 1
Marlin/ultralcd.h View File

@@ -95,7 +95,7 @@
95 95
   extern int absPreheatHPBTemp;
96 96
   extern int absPreheatFanSpeed;
97 97
 
98
-  extern bool cancel_heatup;
98
+  extern bool wait_for_heatup;
99 99
 
100 100
   #if ENABLED(FILAMENT_LCD_DISPLAY)
101 101
     extern millis_t previous_lcd_status_ms;

Loading…
Cancel
Save