diff options
author | kliment <kliment.yanev@gmail.com> | 2011-07-25 12:30:42 -0700 |
---|---|---|
committer | kliment <kliment.yanev@gmail.com> | 2011-07-25 12:30:42 -0700 |
commit | 3ff008c064bd112352138dae0b44db7d50458685 (patch) | |
tree | a6ece438571185fd6bb202ce200cc5b26ca8239f | |
parent | 95fbe3de6e60b14ff8186ea5d17d354188892998 (diff) | |
parent | a24acc77318776409699e4ba78666ca627a998ef (diff) |
Merge pull request #60 from LawrenceLeung/master
Support TEMP_RESIDENCY_TIME.
-rw-r--r-- | Sprinter/Configuration.h | 3 | ||||
-rw-r--r-- | Sprinter/Sprinter.pde | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Sprinter/Configuration.h b/Sprinter/Configuration.h index 59c332f..3073393 100644 --- a/Sprinter/Configuration.h +++ b/Sprinter/Configuration.h @@ -143,6 +143,9 @@ char uuid[] = "00000000-0000-0000-0000-000000000000"; // If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109 //#define WATCHPERIOD 5000 //5 seconds +// Wait this long after achieving target temperature on M109 before continuing with print (seconds) +//#define TEMP_RESIDENCY_TIME 20 + //// The minimal temperature defines the temperature below which the heater will not be enabled #define MINTEMP 5 diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index dde302c..801f103 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -778,6 +778,23 @@ inline void process_commands() } manage_heater(); } + // wait extra time before letting the print continue + #ifdef TEMP_RESIDENCY_TIME + { + long residencyStart = millis(); + codenum = millis(); + while(millis()-residencyStart<(TEMP_RESIDENCY_TIME*1000)) { + if( (millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up. + { + Serial.print("T:"); + Serial.println( analog2temp(current_raw) ); + codenum = millis(); + } + manage_heater(); + } + } + #endif + break; case 190: // M190 - Wait bed for heater to reach target. #if TEMP_1_PIN > -1 |