Cut & Eject: avoid preheat if no filament loaded
and add fullscreen messages for Cut & Eject (messages intentionally reused to save space)
This commit is contained in:
parent
43f3865d7c
commit
52a3beb931
|
|
@ -440,27 +440,6 @@ bool MMU2::unload() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool MMU2::cut_filament(uint8_t slot){
|
||||
if( ! WaitForMMUReady())
|
||||
return false;
|
||||
|
||||
if( FindaDetectsFilament() ){
|
||||
unload();
|
||||
}
|
||||
|
||||
ReportingRAII rep(CommandInProgress::CutFilament);
|
||||
for(;;){
|
||||
logic.CutFilament(slot);
|
||||
if( manage_response(false, true) )
|
||||
break;
|
||||
IncrementMMUFails();
|
||||
}
|
||||
extruder = MMU2_NO_TOOL;
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
Sound_MakeSound(e_SOUND_TYPE_StandardConfirm);
|
||||
return true;
|
||||
}
|
||||
|
||||
void FullScreenMsg(const char *pgmS, uint8_t slot){
|
||||
lcd_update_enable(false);
|
||||
lcd_clear();
|
||||
|
|
@ -469,6 +448,30 @@ void FullScreenMsg(const char *pgmS, uint8_t slot){
|
|||
lcd_print(slot + 1);
|
||||
}
|
||||
|
||||
bool MMU2::cut_filament(uint8_t slot){
|
||||
if( ! WaitForMMUReady())
|
||||
return false;
|
||||
|
||||
FullScreenMsg(_T(MSG_CUT_FILAMENT), slot);
|
||||
{
|
||||
if( FindaDetectsFilament() ){
|
||||
unload();
|
||||
}
|
||||
|
||||
ReportingRAII rep(CommandInProgress::CutFilament);
|
||||
for(;;){
|
||||
logic.CutFilament(slot);
|
||||
if( manage_response(false, true) )
|
||||
break;
|
||||
IncrementMMUFails();
|
||||
}
|
||||
}
|
||||
extruder = MMU2_NO_TOOL;
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
Sound_MakeSound(e_SOUND_TYPE_StandardConfirm);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MMU2::loading_test(uint8_t slot){
|
||||
FullScreenMsg(_T(MSG_TESTING_FILAMENT), slot);
|
||||
tool_change(slot);
|
||||
|
|
@ -541,16 +544,19 @@ bool MMU2::eject_filament(uint8_t slot, bool recover) {
|
|||
if( ! WaitForMMUReady())
|
||||
return false;
|
||||
|
||||
if( FindaDetectsFilament() ){
|
||||
unload();
|
||||
}
|
||||
FullScreenMsg(_T(MSG_EJECT_FILAMENT), slot);
|
||||
{
|
||||
if( FindaDetectsFilament() ){
|
||||
unload();
|
||||
}
|
||||
|
||||
ReportingRAII rep(CommandInProgress::EjectFilament);
|
||||
for(;;) {
|
||||
logic.EjectFilament(slot);
|
||||
if( manage_response(false, true) )
|
||||
break;
|
||||
IncrementMMUFails();
|
||||
ReportingRAII rep(CommandInProgress::EjectFilament);
|
||||
for(;;) {
|
||||
logic.EjectFilament(slot);
|
||||
if( manage_response(false, true) )
|
||||
break;
|
||||
IncrementMMUFails();
|
||||
}
|
||||
}
|
||||
extruder = MMU2_NO_TOOL;
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
|
|
|
|||
|
|
@ -5071,7 +5071,7 @@ static void mmu_eject_filament(uint8_t filament) {
|
|||
}
|
||||
|
||||
static void mmu_fil_eject_menu() {
|
||||
if (bFilamentAction) {
|
||||
if (bFilamentAction || (!MMU2::mmu2.FindaDetectsFilament())) {
|
||||
MENU_BEGIN();
|
||||
MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
||||
for (uint8_t i = 0; i < MMU_FILAMENT_COUNT; i++)
|
||||
|
|
@ -5089,7 +5089,7 @@ static inline void mmu_cut_filament_wrapper(uint8_t index){
|
|||
}
|
||||
|
||||
static void mmu_cut_filament_menu() {
|
||||
if (bFilamentAction) {
|
||||
if (bFilamentAction || (!MMU2::mmu2.FindaDetectsFilament())) {
|
||||
MENU_BEGIN();
|
||||
MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
||||
for (uint8_t i = 0; i < MMU_FILAMENT_COUNT; i++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue