Optimise mmu_cut_filament_menu (#40)
preheat_or_continue should be used here to reduce copying code
This commit is contained in:
parent
8eb054e789
commit
2aa6cfc1ab
|
|
@ -5222,17 +5222,9 @@ static void mmu_cut_filament_menu() {
|
||||||
for (uint8_t i = 0; i < MMU_FILAMENT_COUNT; i++)
|
for (uint8_t i = 0; i < MMU_FILAMENT_COUNT; i++)
|
||||||
MENU_ITEM_FUNCTION_NR_P(_T(MSG_CUT_FILAMENT), i + '1', mmu_cut_filament_wrapper, i); ////MSG_CUT_FILAMENT c=16
|
MENU_ITEM_FUNCTION_NR_P(_T(MSG_CUT_FILAMENT), i + '1', mmu_cut_filament_wrapper, i); ////MSG_CUT_FILAMENT c=16
|
||||||
MENU_END();
|
MENU_END();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
eFilamentAction=FilamentAction::MmuCut;
|
eFilamentAction=FilamentAction::MmuCut;
|
||||||
bFilamentFirstRun=false;
|
preheat_or_continue();
|
||||||
if(target_temperature[0] >= extrude_min_temp)
|
|
||||||
{
|
|
||||||
bFilamentPreheatState=true;
|
|
||||||
mFilamentItem(target_temperature[0],target_temperature_bed);
|
|
||||||
}
|
|
||||||
else lcd_generic_preheat_menu();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //MMU_HAS_CUTTER
|
#endif //MMU_HAS_CUTTER
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue