Set/clear loading_flag also during unload

This commit is contained in:
Yuri D'Elia 2022-08-20 16:04:29 +02:00 committed by Guðni Már Gilbert
parent dece5d268f
commit 170dddfd71
1 changed files with 5 additions and 1 deletions

View File

@ -1867,8 +1867,11 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
if (eFilamentAction == FilamentAction::AutoLoad) eFilamentAction = FilamentAction::None; // i.e. non-autoLoad if (eFilamentAction == FilamentAction::AutoLoad) eFilamentAction = FilamentAction::None; // i.e. non-autoLoad
} }
if (eFilamentAction == FilamentAction::UnLoad) if (eFilamentAction == FilamentAction::UnLoad)
{
loading_flag = true;
enquecommand_P(MSG_M702); // unload filament enquecommand_P(MSG_M702); // unload filament
} }
}
break; break;
case FilamentAction::MmuLoad: case FilamentAction::MmuLoad:
nLevel = bFilamentPreheatState ? 1 : 2; nLevel = bFilamentPreheatState ? 1 : 2;
@ -4886,6 +4889,7 @@ void unload_filament(float unloadLength)
lcd_setstatuspgm(MSG_WELCOME); lcd_setstatuspgm(MSG_WELCOME);
custom_message_type = CustomMsg::Status; custom_message_type = CustomMsg::Status;
eFilamentAction = FilamentAction::None; eFilamentAction = FilamentAction::None;
loading_flag = false;
} }
/// @brief Set print fan speed /// @brief Set print fan speed