Parcourir la source

cooldown blocking selectable by #define.

Bernhard il y a 13 ans
Parent
révision
74d0032e25
2 fichiers modifiés avec 10 ajouts et 2 suppressions
  1. 5
    0
      Marlin/Configuration.h
  2. 5
    2
      Marlin/Marlin.pde

+ 5
- 0
Marlin/Configuration.h Voir le fichier

@@ -84,6 +84,11 @@
84 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 93
 // PID settings:
89 94
 // Uncomment the following line to enable PID support.

+ 5
- 2
Marlin/Marlin.pde Voir le fichier

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

Chargement…
Annuler
Enregistrer