Merge pull request #2188 from mkbel/cut_last_try
Use MMU cutter only as last resort.
This commit is contained in:
commit
21dd8eadd1
1 changed files with 11 additions and 7 deletions
|
@ -1556,19 +1556,23 @@ void mmu_continue_loading(bool blocking)
|
||||||
increment_load_fail();
|
increment_load_fail();
|
||||||
// no break
|
// no break
|
||||||
case Ls::Retry:
|
case Ls::Retry:
|
||||||
#ifdef MMU_HAS_CUTTER
|
++retry; // overflow not handled, as it is not dangerous.
|
||||||
if (1 == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED))
|
if (retry >= max_retry)
|
||||||
{
|
{
|
||||||
mmu_command(MmuCmd::K0 + tmp_extruder);
|
state = Ls::Unload;
|
||||||
manage_response(true, true, MMU_UNLOAD_MOVE);
|
#ifdef MMU_HAS_CUTTER
|
||||||
}
|
if (1 == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED))
|
||||||
|
{
|
||||||
|
mmu_command(MmuCmd::K0 + tmp_extruder);
|
||||||
|
manage_response(true, true, MMU_UNLOAD_MOVE);
|
||||||
|
}
|
||||||
#endif //MMU_HAS_CUTTER
|
#endif //MMU_HAS_CUTTER
|
||||||
|
}
|
||||||
mmu_command(MmuCmd::T0 + tmp_extruder);
|
mmu_command(MmuCmd::T0 + tmp_extruder);
|
||||||
manage_response(true, true, MMU_TCODE_MOVE);
|
manage_response(true, true, MMU_TCODE_MOVE);
|
||||||
success = load_more();
|
success = load_more();
|
||||||
if (success) success = can_load();
|
if (success) success = can_load();
|
||||||
++retry; // overflow not handled, as it is not dangerous.
|
|
||||||
if (retry >= max_retry) state = Ls::Unload;
|
|
||||||
break;
|
break;
|
||||||
case Ls::Unload:
|
case Ls::Unload:
|
||||||
stop_and_save_print_to_ram(0, 0);
|
stop_and_save_print_to_ram(0, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue