Merge pull request #965 from bq/forced_heating_stop
Fixed stop print LCD function on M104
This commit is contained in:
commit
4c823224b0
@ -1946,13 +1946,15 @@ void process_commands()
|
|||||||
/* See if we are heating up or cooling down */
|
/* See if we are heating up or cooling down */
|
||||||
target_direction = isHeatingHotend(tmp_extruder); // true if heating, false if cooling
|
target_direction = isHeatingHotend(tmp_extruder); // true if heating, false if cooling
|
||||||
|
|
||||||
|
cancel_heatup = false;
|
||||||
|
|
||||||
#ifdef TEMP_RESIDENCY_TIME
|
#ifdef TEMP_RESIDENCY_TIME
|
||||||
long residencyStart;
|
long residencyStart;
|
||||||
residencyStart = -1;
|
residencyStart = -1;
|
||||||
/* continue to loop until we have reached the target temp
|
/* continue to loop until we have reached the target temp
|
||||||
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
|
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
|
||||||
while((residencyStart == -1) ||
|
while((!cancel_heatup)&&((residencyStart == -1) ||
|
||||||
(residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL))) ) {
|
(residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL)))) ) {
|
||||||
#else
|
#else
|
||||||
while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
|
while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
|
||||||
#endif //TEMP_RESIDENCY_TIME
|
#endif //TEMP_RESIDENCY_TIME
|
||||||
@ -2009,9 +2011,10 @@ void process_commands()
|
|||||||
}
|
}
|
||||||
codenum = millis();
|
codenum = millis();
|
||||||
|
|
||||||
|
cancel_heatup = false;
|
||||||
target_direction = isHeatingBed(); // true if heating, false if cooling
|
target_direction = isHeatingBed(); // true if heating, false if cooling
|
||||||
|
|
||||||
while ( target_direction ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) )
|
while ( (target_direction)&&(!cancel_heatup) ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) )
|
||||||
{
|
{
|
||||||
if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
|
if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,7 @@ int absPreheatHotendTemp;
|
|||||||
int absPreheatHPBTemp;
|
int absPreheatHPBTemp;
|
||||||
int absPreheatFanSpeed;
|
int absPreheatFanSpeed;
|
||||||
|
|
||||||
|
bool cancel_heatup = false ;
|
||||||
|
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
static float manual_feedrate[] = MANUAL_FEEDRATE;
|
static float manual_feedrate[] = MANUAL_FEEDRATE;
|
||||||
@ -256,6 +257,8 @@ static void lcd_sdcard_stop()
|
|||||||
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
|
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
|
||||||
}
|
}
|
||||||
autotempShutdown();
|
autotempShutdown();
|
||||||
|
|
||||||
|
cancel_heatup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Menu implementation */
|
/* Menu implementation */
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
extern int absPreheatHPBTemp;
|
extern int absPreheatHPBTemp;
|
||||||
extern int absPreheatFanSpeed;
|
extern int absPreheatFanSpeed;
|
||||||
|
|
||||||
|
extern bool cancel_heatup;
|
||||||
|
|
||||||
void lcd_buzz(long duration,uint16_t freq);
|
void lcd_buzz(long duration,uint16_t freq);
|
||||||
bool lcd_clicked();
|
bool lcd_clicked();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user