|
@@ -5920,54 +5920,48 @@ static void lcd_disable_farm_mode()
|
|
|
|
|
|
static void fil_load_menu()
|
|
|
{
|
|
|
- MENU_BEGIN();
|
|
|
- MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load all"), load_all);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 1"), extr_adj_0);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 2"), extr_adj_1);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 3"), extr_adj_2);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 4"), extr_adj_3);
|
|
|
-
|
|
|
- if (mmu_enabled)
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 5"), extr_adj_4);
|
|
|
-
|
|
|
- MENU_END();
|
|
|
-}
|
|
|
+ MENU_BEGIN();
|
|
|
+ MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
+ MENU_ITEM_FUNCTION_P(_i("Load all"), load_all);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '1', extr_adj, 0);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '2', extr_adj, 1);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '3', extr_adj, 2);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '4', extr_adj, 3);
|
|
|
|
|
|
-template <uint8_t filament>
|
|
|
-static void mmu_load_to_nozzle()
|
|
|
-{
|
|
|
- menu_back();
|
|
|
- lcd_mmu_load_to_nozzle(filament);
|
|
|
+ if (mmu_enabled)
|
|
|
+ {
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '5', extr_adj, 3);
|
|
|
+ }
|
|
|
+ MENU_END();
|
|
|
}
|
|
|
|
|
|
static void mmu_load_to_nozzle_menu()
|
|
|
{
|
|
|
-if(bFilamentAction)
|
|
|
-{
|
|
|
- MENU_BEGIN();
|
|
|
- MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 1"), mmu_load_to_nozzle<0>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 2"), mmu_load_to_nozzle<1>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 3"), mmu_load_to_nozzle<2>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 4"), mmu_load_to_nozzle<3>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Load filament 5"), mmu_load_to_nozzle<4>);
|
|
|
- MENU_END();
|
|
|
-}
|
|
|
-else {
|
|
|
- eFilamentAction=e_FILAMENT_ACTION_mmuLoad;
|
|
|
- bFilamentFirstRun=false;
|
|
|
- if(target_temperature[0]>=EXTRUDE_MINTEMP)
|
|
|
- {
|
|
|
- bFilamentPreheatState=true;
|
|
|
- mFilamentItem(target_temperature[0],target_temperature_bed);
|
|
|
- }
|
|
|
- else mFilamentMenu();
|
|
|
- }
|
|
|
+ if (bFilamentAction)
|
|
|
+ {
|
|
|
+ MENU_BEGIN();
|
|
|
+ MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '1', lcd_mmu_load_to_nozzle, 0);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '2', lcd_mmu_load_to_nozzle, 1);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '3', lcd_mmu_load_to_nozzle, 2);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '4', lcd_mmu_load_to_nozzle, 3);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), '5', lcd_mmu_load_to_nozzle, 4);
|
|
|
+ MENU_END();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ eFilamentAction = e_FILAMENT_ACTION_mmuLoad;
|
|
|
+ bFilamentFirstRun = false;
|
|
|
+ if (target_temperature[0] >= EXTRUDE_MINTEMP)
|
|
|
+ {
|
|
|
+ bFilamentPreheatState = true;
|
|
|
+ mFilamentItem(target_temperature[0], target_temperature_bed);
|
|
|
+ }
|
|
|
+ else mFilamentMenu();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-template <uint8_t filament>
|
|
|
-static void mmu_eject_filament()
|
|
|
+static void mmu_eject_filament(uint8_t filament)
|
|
|
{
|
|
|
menu_back();
|
|
|
mmu_eject_filament(filament, true);
|
|
@@ -5975,61 +5969,56 @@ static void mmu_eject_filament()
|
|
|
|
|
|
static void mmu_fil_eject_menu()
|
|
|
{
|
|
|
- if(bFilamentAction)
|
|
|
+ if (bFilamentAction)
|
|
|
{
|
|
|
MENU_BEGIN();
|
|
|
MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Eject filament 1"), mmu_eject_filament<0>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Eject filament 2"), mmu_eject_filament<1>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Eject filament 3"), mmu_eject_filament<2>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Eject filament 4"), mmu_eject_filament<3>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Eject filament 5"), mmu_eject_filament<4>);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '1', mmu_eject_filament, 0);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '2', mmu_eject_filament, 1);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '3', mmu_eject_filament, 2);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '4', mmu_eject_filament, 3);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '5', mmu_eject_filament, 4);
|
|
|
MENU_END();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- eFilamentAction=e_FILAMENT_ACTION_mmuEject;
|
|
|
- bFilamentFirstRun=false;
|
|
|
- if(target_temperature[0]>=EXTRUDE_MINTEMP)
|
|
|
+ eFilamentAction = e_FILAMENT_ACTION_mmuEject;
|
|
|
+ bFilamentFirstRun = false;
|
|
|
+ if (target_temperature[0] >= EXTRUDE_MINTEMP)
|
|
|
{
|
|
|
- bFilamentPreheatState=true;
|
|
|
- mFilamentItem(target_temperature[0],target_temperature_bed);
|
|
|
+ bFilamentPreheatState = true;
|
|
|
+ mFilamentItem(target_temperature[0], target_temperature_bed);
|
|
|
}
|
|
|
else mFilamentMenu();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#ifdef MMU_HAS_CUTTER
|
|
|
-template <uint8_t filament>
|
|
|
-static void mmu_cut_filament()
|
|
|
-{
|
|
|
- menu_back();
|
|
|
- mmu_cut_filament(filament);
|
|
|
-}
|
|
|
|
|
|
static void mmu_cut_filament_menu()
|
|
|
{
|
|
|
-if(bFilamentAction)
|
|
|
-{
|
|
|
- MENU_BEGIN();
|
|
|
- MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Cut filament 1"), mmu_cut_filament<0>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Cut filament 2"), mmu_cut_filament<1>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Cut filament 3"), mmu_cut_filament<2>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Cut filament 4"), mmu_cut_filament<3>);
|
|
|
- MENU_ITEM_FUNCTION_P(_i("Cut filament 5"), mmu_cut_filament<4>);
|
|
|
- MENU_END();
|
|
|
-}
|
|
|
-else {
|
|
|
- eFilamentAction=e_FILAMENT_ACTION_mmuCut;
|
|
|
- bFilamentFirstRun=false;
|
|
|
- if(target_temperature[0]>=EXTRUDE_MINTEMP)
|
|
|
- {
|
|
|
- bFilamentPreheatState=true;
|
|
|
- mFilamentItem(target_temperature[0],target_temperature_bed);
|
|
|
- }
|
|
|
- else mFilamentMenu();
|
|
|
- }
|
|
|
+ if(bFilamentAction)
|
|
|
+ {
|
|
|
+ MENU_BEGIN();
|
|
|
+ MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '1', mmu_cut_filament, 0);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '2', mmu_cut_filament, 1);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '3', mmu_cut_filament, 2);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '4', mmu_cut_filament, 3);
|
|
|
+ MENU_ITEM_FUNCTION_NR_P(_T(MSG_EJECT_FILAMENT), '5', mmu_cut_filament, 4);
|
|
|
+ MENU_END();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ eFilamentAction=e_FILAMENT_ACTION_mmuCut;
|
|
|
+ bFilamentFirstRun=false;
|
|
|
+ if(target_temperature[0]>=EXTRUDE_MINTEMP)
|
|
|
+ {
|
|
|
+ bFilamentPreheatState=true;
|
|
|
+ mFilamentItem(target_temperature[0],target_temperature_bed);
|
|
|
+ }
|
|
|
+ else mFilamentMenu();
|
|
|
+ }
|
|
|
}
|
|
|
#endif
|
|
|
|