Skip to content

Commit

Permalink
PFW-1542 Handle fan error sooner when waiting for heating to complete
Browse files Browse the repository at this point in the history
While waiting for the nozzle to reach a certain temperature, a fan error
should disable the hotend heater. If printing, it will simply pause the print.

Previously the printer would wait for the nozzle to heat up before pausing the print
and turning off the hotend heater.

We rely on LcdCommands::LongPause and must return to the top level loop to process it.
Waiting in the while loop e.g. in M190 does not make sense.
  • Loading branch information
gudnimg committed Sep 30, 2023
1 parent c97143f commit e621d34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6039,6 +6039,12 @@ SERIAL_PROTOCOLPGM("\n\n");

while ( (!cancel_heatup) && (target_direction ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false))) )
{
if (lcd_commands_type == LcdCommands::LongPause) {
// Print was suddenly paused, break out of the loop
// This can happen when the firmware report a fan error
break;
}

if(( _millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
{
if (!farm_mode) {
Expand Down Expand Up @@ -9677,6 +9683,11 @@ static void wait_for_heater(long codenum, uint8_t extruder) {
#else
while (target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder) && (CooldownNoWait == false))) {
#endif //TEMP_RESIDENCY_TIME
if (lcd_commands_type == LcdCommands::LongPause) {
// Print was suddenly paused, break out of the loop
// This can happen when the firmware report a fan error
break;
}
if ((_millis() - codenum) > 1000UL)
{ //Print Temp Reading and remaining time every 1 second while heating up/cooling down
if (!farm_mode) {
Expand Down

0 comments on commit e621d34

Please sign in to comment.