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
 // 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;
4520
 /**
4520
 /**
4521
  * M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
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
  * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
4526
  * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
4582
 
4580
 
4583
   float theTarget = -1.0, old_temp = 9999.0;
4581
   float theTarget = -1.0, old_temp = 9999.0;
4584
   bool wants_to_cool = false;
4582
   bool wants_to_cool = false;
4585
-  cancel_heatup = false;
4583
+  wait_for_heatup = true;
4586
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4584
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4587
 
4585
 
4588
   KEEPALIVE_STATE(NOT_BUSY);
4586
   KEEPALIVE_STATE(NOT_BUSY);
4646
       }
4644
       }
4647
     }
4645
     }
4648
 
4646
 
4649
-  } while (!cancel_heatup && TEMP_CONDITIONS);
4647
+  } while (wait_for_heatup && TEMP_CONDITIONS);
4650
 
4648
 
4651
   LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
4649
   LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
4652
   KEEPALIVE_STATE(IN_HANDLER);
4650
   KEEPALIVE_STATE(IN_HANDLER);
4676
 
4674
 
4677
     float theTarget = -1.0, old_temp = 9999.0;
4675
     float theTarget = -1.0, old_temp = 9999.0;
4678
     bool wants_to_cool = false;
4676
     bool wants_to_cool = false;
4679
-    cancel_heatup = false;
4677
+    wait_for_heatup = true;
4680
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4678
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
4681
 
4679
 
4682
     KEEPALIVE_STATE(NOT_BUSY);
4680
     KEEPALIVE_STATE(NOT_BUSY);
4740
         }
4738
         }
4741
       }
4739
       }
4742
 
4740
 
4743
-    } while (!cancel_heatup && TEMP_BED_CONDITIONS);
4741
+    } while (wait_for_heatup && TEMP_BED_CONDITIONS);
4744
 
4742
 
4745
     LCD_MESSAGEPGM(MSG_BED_DONE);
4743
     LCD_MESSAGEPGM(MSG_BED_DONE);
4746
     KEEPALIVE_STATE(IN_HANDLER);
4744
     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