Merge remote-tracking branch 'upstream/MK3' into variants
This commit is contained in:
commit
860e6f9994
@ -7482,7 +7482,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
|
|||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
if (mmu_enabled == false)
|
if (mmu_enabled == false)
|
||||||
{
|
{
|
||||||
if (mcode_in_progress != 600) //M600 not in progress
|
if ((mcode_in_progress != 600) && (!bFilamentAutoloadFlag)) //M600 not in progress, preHeat @ autoLoad menu not active
|
||||||
{
|
{
|
||||||
if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active)
|
if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active)
|
||||||
{
|
{
|
||||||
@ -7502,9 +7502,19 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lcd_update_enable(false);
|
bFilamentLoad=true; // i.e. filament loading mode
|
||||||
show_preheat_nozzle_warning();
|
bFilamentFirstRun=false;
|
||||||
lcd_update_enable(true);
|
bFilamentAutoloadFlag=true;
|
||||||
|
if(target_temperature[0]>=EXTRUDE_MINTEMP)
|
||||||
|
{
|
||||||
|
bFilamentPreheatState=true;
|
||||||
|
mFilamentItem(target_temperature[0]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menu_submenu(mFilamentMenu);
|
||||||
|
lcd_timeoutToStatus.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1782,6 +1782,7 @@ void lcd_return_to_status()
|
|||||||
lcd_refresh(); // to maybe revive the LCD if static electricity killed it.
|
lcd_refresh(); // to maybe revive the LCD if static electricity killed it.
|
||||||
menu_goto(lcd_status_screen, 0, false, true);
|
menu_goto(lcd_status_screen, 0, false, true);
|
||||||
menu_depth = 0;
|
menu_depth = 0;
|
||||||
|
bFilamentAutoloadFlag=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Pause print, disable nozzle heater, move to park position
|
//! @brief Pause print, disable nozzle heater, move to park position
|
||||||
@ -2300,6 +2301,7 @@ void lcd_set_filament_oq_meass()
|
|||||||
bool bFilamentFirstRun;
|
bool bFilamentFirstRun;
|
||||||
bool bFilamentLoad;
|
bool bFilamentLoad;
|
||||||
bool bFilamentPreheatState;
|
bool bFilamentPreheatState;
|
||||||
|
bool bFilamentAutoloadFlag;
|
||||||
|
|
||||||
static void mFilamentPrompt()
|
static void mFilamentPrompt()
|
||||||
{
|
{
|
||||||
@ -2327,9 +2329,11 @@ if(lcd_clicked())
|
|||||||
}
|
}
|
||||||
else enquecommand_P(PSTR("M702")); // unload filament
|
else enquecommand_P(PSTR("M702")); // unload filament
|
||||||
}
|
}
|
||||||
|
if(bFilamentLoad) // i.e. not necessary for preHeat @ unload
|
||||||
|
bFilamentAutoloadFlag=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mFilamentItem(uint16_t nTemp)
|
void mFilamentItem(uint16_t nTemp)
|
||||||
{
|
{
|
||||||
static int nTargetOld;
|
static int nTargetOld;
|
||||||
|
|
||||||
@ -2354,6 +2358,8 @@ if(lcd_clicked())
|
|||||||
}
|
}
|
||||||
else setTargetHotend0((float)nTargetOld);
|
else setTargetHotend0((float)nTargetOld);
|
||||||
menu_back();
|
menu_back();
|
||||||
|
if(bFilamentLoad) // i.e. not necessary for preHeat @ unload
|
||||||
|
bFilamentAutoloadFlag=false;
|
||||||
}
|
}
|
||||||
else if(!isHeatingHotend0())
|
else if(!isHeatingHotend0())
|
||||||
{
|
{
|
||||||
@ -2399,10 +2405,17 @@ mFilamentItem(FLEX_PREHEAT_HOTEND_TEMP);
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void mFilamentMenu()
|
void mFilamentBack()
|
||||||
|
{
|
||||||
|
menu_back();
|
||||||
|
if(bFilamentLoad) // i.e. not necessary for preHeat @ unload
|
||||||
|
bFilamentAutoloadFlag=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mFilamentMenu()
|
||||||
{
|
{
|
||||||
MENU_BEGIN();
|
MENU_BEGIN();
|
||||||
MENU_ITEM_BACK_P(_T(MSG_MAIN));
|
MENU_ITEM_FUNCTION_P(_T(MSG_MAIN),mFilamentBack);
|
||||||
MENU_ITEM_SUBMENU_P(PSTR("PLA - " STRINGIFY(PLA_PREHEAT_HOTEND_TEMP)),mFilamentItem_PLA);
|
MENU_ITEM_SUBMENU_P(PSTR("PLA - " STRINGIFY(PLA_PREHEAT_HOTEND_TEMP)),mFilamentItem_PLA);
|
||||||
MENU_ITEM_SUBMENU_P(PSTR("PET - " STRINGIFY(PET_PREHEAT_HOTEND_TEMP)),mFilamentItem_PET);
|
MENU_ITEM_SUBMENU_P(PSTR("PET - " STRINGIFY(PET_PREHEAT_HOTEND_TEMP)),mFilamentItem_PET);
|
||||||
MENU_ITEM_SUBMENU_P(PSTR("ABS - " STRINGIFY(ABS_PREHEAT_HOTEND_TEMP)),mFilamentItem_ABS);
|
MENU_ITEM_SUBMENU_P(PSTR("ABS - " STRINGIFY(ABS_PREHEAT_HOTEND_TEMP)),mFilamentItem_ABS);
|
||||||
@ -2636,22 +2649,8 @@ void lcd_load_filament_color_check()
|
|||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
static void lcd_menu_AutoLoadFilament()
|
static void lcd_menu_AutoLoadFilament()
|
||||||
{
|
{
|
||||||
if (degHotend0() > EXTRUDE_MINTEMP)
|
|
||||||
{
|
|
||||||
uint8_t nlines;
|
uint8_t nlines;
|
||||||
lcd_display_message_fullscreen_nonBlocking_P(_i("Autoloading filament is active, just press the knob and insert filament..."),nlines);////MSG_AUTOLOADING_ENABLED c=20 r=4
|
lcd_display_message_fullscreen_nonBlocking_P(_i("Autoloading filament is active, just press the knob and insert filament..."),nlines);////MSG_AUTOLOADING_ENABLED c=20 r=4
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
static_assert(sizeof(menu_data)>=sizeof(ShortTimer), "ShortTimer doesn't fit into menu_data");
|
|
||||||
ShortTimer* ptimer = (ShortTimer*)&(menu_data[0]);
|
|
||||||
if (!ptimer->running()) ptimer->start();
|
|
||||||
lcd_set_cursor(0, 0);
|
|
||||||
lcd_puts_P(_T(MSG_ERROR));
|
|
||||||
lcd_set_cursor(0, 2);
|
|
||||||
lcd_puts_P(_T(MSG_PREHEAT_NOZZLE));
|
|
||||||
if (ptimer->expired(2000ul)) menu_back();
|
|
||||||
}
|
|
||||||
menu_back_if_clicked();
|
menu_back_if_clicked();
|
||||||
}
|
}
|
||||||
#endif //FILAMENT_SENSOR
|
#endif //FILAMENT_SENSOR
|
||||||
|
@ -133,6 +133,12 @@ void extr_unload_used();
|
|||||||
#endif //SNMM
|
#endif //SNMM
|
||||||
void extr_unload();
|
void extr_unload();
|
||||||
|
|
||||||
|
extern bool bFilamentFirstRun;
|
||||||
|
extern bool bFilamentLoad;
|
||||||
|
extern bool bFilamentPreheatState;
|
||||||
|
extern bool bFilamentAutoloadFlag;
|
||||||
|
void mFilamentItem(uint16_t nTemp);
|
||||||
|
void mFilamentMenu();
|
||||||
void unload_filament();
|
void unload_filament();
|
||||||
|
|
||||||
void stack_error();
|
void stack_error();
|
||||||
|
Loading…
Reference in New Issue
Block a user