Browse Source

cooldown blocking selectable by #define.

Bernhard 13 years ago
parent
commit
74d0032e25
2 changed files with 10 additions and 2 deletions
  1. 5
    0
      Marlin/Configuration.h
  2. 5
    2
      Marlin/Marlin.pde

+ 5
- 0
Marlin/Configuration.h View File

84
 //#define BED_MAXTEMP 150
84
 //#define BED_MAXTEMP 150
85
 
85
 
86
 
86
 
87
+// Wait for Cooldown
88
+// This defines if the M109 call should not block if it is cooling down.
89
+// example: From a current temp of 220, you set M109 S200. 
90
+// if CooldownNoWait is defined M109 will not wait for the cooldown to finish
91
+#define CooldownNoWait true
87
 
92
 
88
 // PID settings:
93
 // PID settings:
89
 // Uncomment the following line to enable PID support.
94
 // Uncomment the following line to enable PID support.

+ 5
- 2
Marlin/Marlin.pde View File

517
       codenum = 0;
517
       codenum = 0;
518
       if(code_seen('P')) codenum = code_value(); // milliseconds to wait
518
       if(code_seen('P')) codenum = code_value(); // milliseconds to wait
519
       if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
519
       if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
520
+      
521
+      st_synchronize();
520
       codenum += millis();  // keep track of when we started waiting
522
       codenum += millis();  // keep track of when we started waiting
523
+      
521
       while(millis()  < codenum ){
524
       while(millis()  < codenum ){
522
         manage_heater();
525
         manage_heater();
523
       }
526
       }
579
 
582
 
580
     switch( (int)code_value() ) 
583
     switch( (int)code_value() ) 
581
     {
584
     {
582
-       case 17:
585
+    case 17:
583
         LCD_MESSAGEPGM("No move.");
586
         LCD_MESSAGEPGM("No move.");
584
         enable_x(); 
587
         enable_x(); 
585
         enable_y(); 
588
         enable_y(); 
740
           while((target_direction ? (isHeatingHotend0()) : (isCoolingHotend0())) ||
743
           while((target_direction ? (isHeatingHotend0()) : (isCoolingHotend0())) ||
741
                   (residencyStart > -1 && (millis() - residencyStart) < TEMP_RESIDENCY_TIME*1000) ) {
744
                   (residencyStart > -1 && (millis() - residencyStart) < TEMP_RESIDENCY_TIME*1000) ) {
742
         #else
745
         #else
743
-          while ( target_direction ? (isHeatingHotend0()) : (isCoolingHotend0()) ) {
746
+          while ( target_direction ? (isHeatingHotend0()) : (isCoolingHotend0()&&(CooldownNoWait==false)) ) {
744
         #endif //TEMP_RESIDENCY_TIME
747
         #endif //TEMP_RESIDENCY_TIME
745
         if( (millis() - codenum) > 1000 ) 
748
         if( (millis() - codenum) > 1000 ) 
746
         { //Print Temp Reading every 1 second while heating up/cooling down
749
         { //Print Temp Reading every 1 second while heating up/cooling down

Loading…
Cancel
Save