summaryrefslogtreecommitdiff
path: root/Sprinter/Sprinter.pde
diff options
context:
space:
mode:
authorLawrence Leung larryleungcal@yahoo.com <lawrence@Barrett.petitearmy.com>2011-07-25 00:51:01 -0700
committerLawrence Leung larryleungcal@yahoo.com <lawrence@Barrett.petitearmy.com>2011-07-25 00:51:27 -0700
commit067c662510309a3c1841921d2c01e408d6311da4 (patch)
treea77978aa6ad55bc8e8dadcaadb366402a0e57914 /Sprinter/Sprinter.pde
parent4c385a2f5d0cdb375bed7f095dbc3382cc8b66f2 (diff)
add support for TEMP_RESIDENCY_TIME for M109
Diffstat (limited to 'Sprinter/Sprinter.pde')
-rw-r--r--Sprinter/Sprinter.pde17
1 files changed, 17 insertions, 0 deletions
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