Remove duplicate preheat menu.

Known limitations: farm_mode missing, wizard_active missing, cooldown missing, ASA missing, print fan missing.
This commit is contained in:
Marek Bel 2019-08-26 20:11:52 +02:00
parent b9b0d6049e
commit 3628d893ee
2 changed files with 10 additions and 21 deletions

View File

@ -2025,27 +2025,8 @@ static void lcd_menu_test_restore()
static void lcd_preheat_menu()
{
MENU_BEGIN();
if (!wizard_active) MENU_ITEM_BACK_P(_T(MSG_MAIN));
if (farm_mode) {
MENU_ITEM_FUNCTION_P(PSTR("farm - " STRINGIFY(FARM_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(FARM_PREHEAT_HPB_TEMP)), lcd_preheat_farm);
MENU_ITEM_FUNCTION_P(PSTR("nozzle - " STRINGIFY(FARM_PREHEAT_HOTEND_TEMP) "/0"), lcd_preheat_farm_nozzle);
MENU_ITEM_FUNCTION_P(_T(MSG_COOLDOWN), lcd_cooldown);
} else {
MENU_ITEM_FUNCTION_P(PSTR("PLA - " STRINGIFY(PLA_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(PLA_PREHEAT_HPB_TEMP)), lcd_preheat_pla);
MENU_ITEM_FUNCTION_P(PSTR("PET - " STRINGIFY(PET_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(PET_PREHEAT_HPB_TEMP)), lcd_preheat_pet);
MENU_ITEM_FUNCTION_P(PSTR("ASA - " STRINGIFY(ASA_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(ASA_PREHEAT_HPB_TEMP)), lcd_preheat_asa);
MENU_ITEM_FUNCTION_P(PSTR("ABS - " STRINGIFY(ABS_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(ABS_PREHEAT_HPB_TEMP)), lcd_preheat_abs);
MENU_ITEM_FUNCTION_P(PSTR("HIPS - " STRINGIFY(HIPS_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(HIPS_PREHEAT_HPB_TEMP)), lcd_preheat_hips);
MENU_ITEM_FUNCTION_P(PSTR("PP - " STRINGIFY(PP_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(PP_PREHEAT_HPB_TEMP)), lcd_preheat_pp);
MENU_ITEM_FUNCTION_P(PSTR("FLEX - " STRINGIFY(FLEX_PREHEAT_HOTEND_TEMP) "/" STRINGIFY(FLEX_PREHEAT_HPB_TEMP)), lcd_preheat_flex);
if (!wizard_active) MENU_ITEM_FUNCTION_P(_T(MSG_COOLDOWN), lcd_cooldown);
}
MENU_END();
eFilamentAction = FilamentAction::Preheat;
mFilamentMenu();
}
static void lcd_support_menu()
@ -2371,6 +2352,13 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
setTargetHotend0((float )nTemp);
setTargetBed((float) nTempBed);
if (eFilamentAction == FilamentAction::Preheat)
{
eFilamentAction = FilamentAction::None;
lcd_return_to_status();
return;
}
lcd_timeoutToStatus.stop();
if (current_temperature[0] > (target_temperature[0] * 0.95))

View File

@ -167,6 +167,7 @@ enum class FilamentAction : uint_least8_t
MmuUnLoad,
MmuEject,
MmuCut,
Preheat,
};
extern FilamentAction eFilamentAction;