From 06411d5c9e39bda41be21d56cec0f4cc21e2e612 Mon Sep 17 00:00:00 2001 From: Bernhard Date: Sun, 11 Dec 2011 22:18:50 +0100 Subject: [PATCH] ultralcd can now also stop the wait loop for the hot-end m109 heating when stopping sd prints. --- Marlin/Marlin.h | 1 + Marlin/Marlin.pde | 3 ++- Marlin/cardreader.pde | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 73ffd421af..8f98244089 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -131,5 +131,6 @@ extern float homing_feedrate[]; extern bool axis_relative_modes[]; extern float current_position[NUM_AXIS] ; extern float add_homeing[3]; +extern bool stop_heating_wait; #endif diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde index 0a8a80c4ce..4d031ea788 100644 --- a/Marlin/Marlin.pde +++ b/Marlin/Marlin.pde @@ -138,7 +138,7 @@ int saved_feedmultiply; volatile bool feedmultiplychanged=false; float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0}; float add_homeing[3]={0,0,0}; - +bool stop_heating_wait=false; //=========================================================================== //=============================private variables============================= //=========================================================================== @@ -825,6 +825,7 @@ FORCE_INLINE void process_commands() } manage_heater(); LCD_STATUS; + if(stop_heating_wait) break; #ifdef TEMP_RESIDENCY_TIME /* start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time or when current temp falls outside the hysteresis after target temp was reached */ diff --git a/Marlin/cardreader.pde b/Marlin/cardreader.pde index 735a1cdcd8..2cf44e6cd3 100644 --- a/Marlin/cardreader.pde +++ b/Marlin/cardreader.pde @@ -434,6 +434,7 @@ void CardReader::printingHasFinished() { quickStop(); sdprinting = false; + stop_heating_wait=true; if(SD_FINISHED_STEPPERRELEASE) { //finishAndDisableSteppers();