Browse Source

Merge pull request #4223 from thinkyhead/rc_rename_heatup

Change cancel_heatup to wait_for_heatup
Scott Lahteine 8 years ago
parent
commit
7735ec5e7a
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
 // Relative Mode. Enable with G91, disable with G90.
332
 // Relative Mode. Enable with G91, disable with G90.
333
 static bool relative_mode = false;
333
 static bool relative_mode = false;
334
 
334
 
335
-bool cancel_heatup = false;
335
+bool wait_for_heatup = true;
336
 
336
 
337
 const char errormagic[] PROGMEM = "Error:";
337
 const char errormagic[] PROGMEM = "Error:";
338
 const char echomagic[] PROGMEM = "echo:";
338
 const char echomagic[] PROGMEM = "echo:";
1107
 
1107
 
1108
       // If command was e-stop process now
1108
       // If command was e-stop process now
1109
       if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
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
       #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
1112
       #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
1113
         last_command_time = ms;
1113
         last_command_time = ms;
4540
 /**
4540
 /**
4541
  * M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
4541
  * M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
4542
  */
4542
  */
4543
-inline void gcode_M108() {
4544
-  cancel_heatup = true;
4545
-}
4543
+inline void gcode_M108() { wait_for_heatup = false; }
4546
 
4544
 
4547
 /**
4545
 /**
4548
  * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
4546
  * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
4602
 
4600
 
4603
   float theTarget = -1.0, old_temp = 9999.0;
4601
   float theTarget = -1.0, old_temp = 9999.0;
4604
   bool wants_to_cool = false;
4602
   bool wants_to_cool = false;
4605
-  cancel_heatup = false;
4603
+  wait_for_heatup = true;
4606
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4604
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4607
 
4605
 
4608
   KEEPALIVE_STATE(NOT_BUSY);
4606
   KEEPALIVE_STATE(NOT_BUSY);
4666
       }
4664
       }
4667
     }
4665
     }
4668
 
4666
 
4669
-  } while (!cancel_heatup && TEMP_CONDITIONS);
4667
+  } while (wait_for_heatup && TEMP_CONDITIONS);
4670
 
4668
 
4671
   LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
4669
   LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
4672
   KEEPALIVE_STATE(IN_HANDLER);
4670
   KEEPALIVE_STATE(IN_HANDLER);
4696
 
4694
 
4697
     float theTarget = -1.0, old_temp = 9999.0;
4695
     float theTarget = -1.0, old_temp = 9999.0;
4698
     bool wants_to_cool = false;
4696
     bool wants_to_cool = false;
4699
-    cancel_heatup = false;
4697
+    wait_for_heatup = true;
4700
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4698
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4701
 
4699
 
4702
     KEEPALIVE_STATE(NOT_BUSY);
4700
     KEEPALIVE_STATE(NOT_BUSY);
4760
         }
4758
         }
4761
       }
4759
       }
4762
 
4760
 
4763
-    } while (!cancel_heatup && TEMP_BED_CONDITIONS);
4761
+    } while (wait_for_heatup && TEMP_BED_CONDITIONS);
4764
 
4762
 
4765
     LCD_MESSAGEPGM(MSG_BED_DONE);
4763
     LCD_MESSAGEPGM(MSG_BED_DONE);
4766
     KEEPALIVE_STATE(IN_HANDLER);
4764
     KEEPALIVE_STATE(IN_HANDLER);

+ 1
- 1
Marlin/ultralcd.cpp View File

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

+ 1
- 1
Marlin/ultralcd.h View File

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

Loading…
Cancel
Save