@ -39,6 +39,10 @@
# include "../Marlin.h"
# include "../Marlin.h"
# if ENABLED(ADVANCED_PAUSE_FEATURE)
# include "../feature/pause.h"
# endif
# if ENABLED(PRINTCOUNTER) && ENABLED(LCD_INFO_MENU)
# if ENABLED(PRINTCOUNTER) && ENABLED(LCD_INFO_MENU)
# include "../libs/duration_t.h"
# include "../libs/duration_t.h"
# endif
# endif
@ -183,7 +187,7 @@ uint16_t max_display_update_time = 0;
void lcd_control_temperature_preheat_material2_settings_menu ( ) ;
void lcd_control_temperature_preheat_material2_settings_menu ( ) ;
# endif
# endif
# if DISABLED(NO_VOLUMETRICS)
# if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_control_filament_menu ( ) ;
void lcd_control_filament_menu ( ) ;
# endif
# endif
@ -201,14 +205,18 @@ uint16_t max_display_update_time = 0;
# endif
# endif
# if ENABLED(ADVANCED_PAUSE_FEATURE)
# if ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_advanced_pause_toocold_menu ( ) ;
# if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
void lcd_change_filament_menu ( ) ;
# else
void lcd_temp_menu_e0_filament_change ( ) ;
# endif
void lcd_advanced_pause_option_menu ( ) ;
void lcd_advanced_pause_option_menu ( ) ;
void lcd_advanced_pause_init_message ( ) ;
void lcd_advanced_pause_init_message ( ) ;
void lcd_advanced_pause_unload_message ( ) ;
void lcd_advanced_pause_unload_message ( ) ;
void lcd_advanced_pause_insert_message ( ) ;
void lcd_advanced_pause_insert_message ( ) ;
void lcd_advanced_pause_load_message ( ) ;
void lcd_advanced_pause_load_message ( ) ;
void lcd_advanced_pause_heat_nozzle ( ) ;
void lcd_advanced_pause_heat_nozzle ( ) ;
void lcd_advanced_pause_extrud e_message ( ) ;
void lcd_advanced_pause_purg e_message ( ) ;
void lcd_advanced_pause_resume_message ( ) ;
void lcd_advanced_pause_resume_message ( ) ;
# endif
# endif
@ -1249,61 +1257,6 @@ void kill_screen(const char* lcd_msg) {
# endif
# endif
}
}
# if ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_enqueue_filament_change (
# if EXTRUDERS > 1
const uint8_t extruder
# endif
) {
# if ENABLED(PREVENT_COLD_EXTRUSION)
if ( ! DEBUGGING ( DRYRUN ) & & thermalManager . tooColdToExtrude ( active_extruder ) ) {
lcd_save_previous_screen ( ) ;
lcd_goto_screen ( lcd_advanced_pause_toocold_menu ) ;
return ;
}
# endif
lcd_advanced_pause_show_message ( ADVANCED_PAUSE_MESSAGE_INIT ) ;
# if EXTRUDERS <= 1
enqueue_and_echo_commands_P ( PSTR ( " M600 B0 " ) ) ;
# else
char * command_M600 ;
switch ( extruder ) {
case 0 : command_M600 = PSTR ( " M600 B0 T0 " ) ; break ;
case 1 : command_M600 = PSTR ( " M600 B0 T1 " ) ; break ;
# if EXTRUDERS > 2
case 2 : command_M600 = PSTR ( " M600 B0 T2 " ) ; break ;
# if EXTRUDERS > 3
case 3 : command_M600 = PSTR ( " M600 B0 T3 " ) ; break ;
# if EXTRUDERS > 4
case 4 : command_M600 = PSTR ( " M600 B0 T4 " ) ; break ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
}
enqueue_and_echo_commands_P ( command_M600 ) ;
# endif // EXTRUDERS > 1
}
# if EXTRUDERS > 1
void lcd_enqueue_filament_change_e0 ( ) { lcd_enqueue_filament_change ( 0 ) ; }
void lcd_enqueue_filament_change_e1 ( ) { lcd_enqueue_filament_change ( 1 ) ; }
# if EXTRUDERS > 2
void lcd_enqueue_filament_change_e2 ( ) { lcd_enqueue_filament_change ( 2 ) ; }
# if EXTRUDERS > 3
void lcd_enqueue_filament_change_e3 ( ) { lcd_enqueue_filament_change ( 3 ) ; }
# if EXTRUDERS > 4
void lcd_enqueue_filament_change_e4 ( ) { lcd_enqueue_filament_change ( 4 ) ; }
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# endif // EXTRUDERS > 1
# endif // ADVANCED_PAUSE_FEATURE
// First Fan Speed title in "Tune" and "Control>Temperature" menus
// First Fan Speed title in "Tune" and "Control>Temperature" menus
# if FAN_COUNT > 0 && HAS_FAN0
# if FAN_COUNT > 0 && HAS_FAN0
# if FAN_COUNT > 1
# if FAN_COUNT > 1
@ -1445,26 +1398,13 @@ void kill_screen(const char* lcd_msg) {
// Change filament
// Change filament
//
//
# if ENABLED(ADVANCED_PAUSE_FEATURE)
# if ENABLED(ADVANCED_PAUSE_FEATURE)
# if EXTRUDERS > 1
# if E_STEPPERS == 1 && !ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
if ( ! thermalManager . tooColdToExtrude ( 0 ) )
if ( ! thermalManager . targetTooColdToExtrude ( active_extruder ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E1 , lcd_enqueue_filament_change_e0 ) ;
MENU_ITEM ( gcode , MSG_FILAMENTCHANGE , PSTR ( " M600 B0 " ) ) ;
if ( ! thermalManager . tooColdToExtrude ( 1 ) )
else
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E2 , lcd_enqueue_filament_change_e1 ) ;
MENU_ITEM ( submenu , MSG_FILAMENTCHANGE , lcd_temp_menu_e0_filament_change ) ;
# if EXTRUDERS > 2
if ( ! thermalManager . tooColdToExtrude ( 2 ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E3 , lcd_enqueue_filament_change_e2 ) ;
# if EXTRUDERS > 3
if ( ! thermalManager . tooColdToExtrude ( 3 ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E4 , lcd_enqueue_filament_change_e3 ) ;
# if EXTRUDERS > 4
if ( ! thermalManager . tooColdToExtrude ( 4 ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E5 , lcd_enqueue_filament_change_e4 ) ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# else
# else
if ( ! thermalManager . tooColdToExtrude ( active_extruder ) )
MENU_ITEM ( submenu , MSG_FILAMENTCHANGE , lcd_change_filament_menu ) ;
MENU_ITEM ( function , MSG_FILAMENTCHANGE , lcd_enqueue_filament_change ) ;
# endif
# endif
# endif
# endif
@ -2651,7 +2591,6 @@ void kill_screen(const char* lcd_msg) {
// Set Home Offsets
// Set Home Offsets
//
//
MENU_ITEM ( function , MSG_SET_HOME_OFFSETS , lcd_set_home_offsets ) ;
MENU_ITEM ( function , MSG_SET_HOME_OFFSETS , lcd_set_home_offsets ) ;
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
# endif
# endif
//
//
@ -2664,26 +2603,13 @@ void kill_screen(const char* lcd_msg) {
//
//
# if ENABLED(ADVANCED_PAUSE_FEATURE)
# if ENABLED(ADVANCED_PAUSE_FEATURE)
if ( ! IS_SD_FILE_OPEN ) {
if ( ! IS_SD_FILE_OPEN ) {
# if EXTRUDERS > 1
# if E_STEPPERS == 1 && !ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
if ( ! thermalManager . tooColdToExtrude ( 0 ) )
if ( ! thermalManager . targetTooColdToExtrude ( active_extruder ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E1 , lcd_enqueue_filament_change_e0 ) ;
MENU_ITEM ( gcode , MSG_FILAMENTCHANGE , PSTR ( " M600 B0 " ) ) ;
if ( ! thermalManager . tooColdToExtrude ( 1 ) )
else
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E2 , lcd_enqueue_filament_change_e1 ) ;
MENU_ITEM ( submenu , MSG_FILAMENTCHANGE , lcd_temp_menu_e0_filament_change ) ;
# if EXTRUDERS > 2
if ( ! thermalManager . tooColdToExtrude ( 2 ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E3 , lcd_enqueue_filament_change_e2 ) ;
# if EXTRUDERS > 3
if ( ! thermalManager . tooColdToExtrude ( 3 ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E4 , lcd_enqueue_filament_change_e3 ) ;
# if EXTRUDERS > 4
if ( ! thermalManager . tooColdToExtrude ( 4 ) )
MENU_ITEM ( function , MSG_FILAMENTCHANGE " " MSG_E5 , lcd_enqueue_filament_change_e4 ) ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# else
# else
if ( ! thermalManager . tooColdToExtrude ( active_extruder ) )
MENU_ITEM ( submenu , MSG_FILAMENTCHANGE , lcd_change_filament_menu ) ;
MENU_ITEM ( function , MSG_FILAMENTCHANGE , lcd_enqueue_filament_change ) ;
# endif
# endif
}
}
# endif // ADVANCED_PAUSE_FEATURE
# endif // ADVANCED_PAUSE_FEATURE
@ -3232,14 +3158,14 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM ( submenu , MSG_TEMPERATURE , lcd_control_temperature_menu ) ;
MENU_ITEM ( submenu , MSG_TEMPERATURE , lcd_control_temperature_menu ) ;
MENU_ITEM ( submenu , MSG_MOTION , lcd_control_motion_menu ) ;
MENU_ITEM ( submenu , MSG_MOTION , lcd_control_motion_menu ) ;
# if DISABLED(NO_VOLUMETRICS)
# if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
MENU_ITEM ( submenu , MSG_FILAMENT , lcd_control_filament_menu ) ;
MENU_ITEM ( submenu , MSG_FILAMENT , lcd_control_filament_menu ) ;
# elif ENABLED(LIN_ADVANCE)
# elif ENABLED(LIN_ADVANCE)
MENU_ITEM_EDIT ( float3 , MSG_ADVANCE_K , & planner . extruder_advance_k , 0 , 999 ) ;
MENU_ITEM_EDIT ( float3 , MSG_ADVANCE_K , & planner . extruder_advance_k , 0 , 999 ) ;
# endif
# endif
# if HAS_LCD_CONTRAST
# if HAS_LCD_CONTRAST
MENU_ITEM_EDIT_CALLBACK ( int3 , MSG_CONTRAST , ( int16_t * ) & lcd_contrast , LCD_CONTRAST_MIN , LCD_CONTRAST_MAX , lcd_callback_set_contrast , true ) ;
MENU_ITEM_EDIT_CALLBACK ( int3 , MSG_CONTRAST , & lcd_contrast , LCD_CONTRAST_MIN , LCD_CONTRAST_MAX , lcd_callback_set_contrast , true ) ;
# endif
# endif
# if ENABLED(FWRETRACT)
# if ENABLED(FWRETRACT)
MENU_ITEM ( submenu , MSG_RETRACT , lcd_control_retract_menu ) ;
MENU_ITEM ( submenu , MSG_RETRACT , lcd_control_retract_menu ) ;
@ -3491,7 +3417,7 @@ void kill_screen(const char* lcd_msg) {
# if DISABLED(SLIM_LCD_MENUS)
# if DISABLED(SLIM_LCD_MENUS)
void _lcd_control_temperature_preheat_settings_menu ( uint8_t material ) {
void _lcd_control_temperature_preheat_settings_menu ( const uint8_t material ) {
# if HOTENDS > 4
# if HOTENDS > 4
# define MINTEMP_ALL MIN5(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP)
# define MINTEMP_ALL MIN5(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP)
# define MAXTEMP_ALL MAX5(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP)
# define MAXTEMP_ALL MAX5(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP)
@ -3737,7 +3663,7 @@ void kill_screen(const char* lcd_msg) {
END_MENU ( ) ;
END_MENU ( ) ;
}
}
# if DISABLED(NO_VOLUMETRICS)
# if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
/**
/**
*
*
* " Control " > " Filament " submenu
* " Control " > " Filament " submenu
@ -3751,30 +3677,76 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT ( float3 , MSG_ADVANCE_K , & planner . extruder_advance_k , 0 , 999 ) ;
MENU_ITEM_EDIT ( float3 , MSG_ADVANCE_K , & planner . extruder_advance_k , 0 , 999 ) ;
# endif
# endif
MENU_ITEM_EDIT_CALLBACK ( bool , MSG_VOLUMETRIC_ENABLED , & parser . volumetric_enabled , planner . calculate_volumetric_multipliers ) ;
# if DISABLED(NO_VOLUMETRICS)
MENU_ITEM_EDIT_CALLBACK ( bool , MSG_VOLUMETRIC_ENABLED , & parser . volumetric_enabled , planner . calculate_volumetric_multipliers ) ;
if ( parser . volumetric_enabled ) {
# if EXTRUDERS == 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM , & planner . filament_size [ 0 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
# else // EXTRUDERS > 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM , & planner . filament_size [ active_extruder ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E1 , & planner . filament_size [ 0 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E2 , & planner . filament_size [ 1 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
# if EXTRUDERS > 2
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E3 , & planner . filament_size [ 2 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
# if EXTRUDERS > 3
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E4 , & planner . filament_size [ 3 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
# if EXTRUDERS > 4
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E5 , & planner . filament_size [ 4 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# endif // EXTRUDERS > 1
}
# endif
# if ENABLED(ADVANCED_PAUSE_FEATURE)
const float extrude_maxlength =
# if ENABLED(PREVENT_LENGTHY_EXTRUDE)
EXTRUDE_MAXLENGTH
# else
999.0f
# endif
;
if ( parser . volumetric_enabled ) {
# if EXTRUDERS == 1
# if EXTRUDERS == 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM , & planner . filament_size [ 0 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D , & filament_change_unload_length [ 0 ] , 0.0 , extrude_maxlength ) ;
# else // EXTRUDERS > 1
# else // EXTRUDERS > 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM , & planner . filament_size [ active_extruder ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D , & filament_change_unload_length [ active_extruder ] , 0.0 , extrude_maxlength ) ;
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E1 , & planner . filament_size [ 0 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D MSG_DIAM_E1 , & filament_change_unload_length [ 0 ] , 0.0 , extrude_maxlength ) ;
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E2 , & planner . filament_size [ 1 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D MSG_DIAM_E2 , & filament_change_unload_length [ 1 ] , 0.0 , extrude_maxlength ) ;
# if EXTRUDERS > 2
# if EXTRUDERS > 2
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E3 , & planner . filament_size [ 2 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D MSG_DIAM_E3 , & filament_change_unload_length [ 2 ] , 0.0 , extrude_maxlength ) ;
# if EXTRUDERS > 3
# if EXTRUDERS > 3
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E4 , & planner . filament_size [ 3 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D MSG_DIAM_E4 , & filament_change_unload_length [ 3 ] , 0.0 , extrude_maxlength ) ;
# if EXTRUDERS > 4
# if EXTRUDERS > 4
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E5 , & planner . filament_size [ 4 ] , 1.5 , 3.25 , planner . calculate_volumetric_multipliers ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_UNLOA D MSG_DIAM_E5 , & filament_change_unload_length [ 4 ] , 0.0 , extrude_maxlength ) ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# endif // EXTRUDERS > 2
# endif // EXTRUDERS > 1
# endif // EXTRUDERS > 1
}
# if EXTRUDERS == 1
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD , & filament_change_load_length [ 0 ] , 0.0 , extrude_maxlength ) ;
# else // EXTRUDERS > 1
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD , & filament_change_load_length [ active_extruder ] , 0.0 , extrude_maxlength ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD MSG_DIAM_E1 , & filament_change_load_length [ 0 ] , 0.0 , extrude_maxlength ) ;
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD MSG_DIAM_E2 , & filament_change_load_length [ 1 ] , 0.0 , extrude_maxlength ) ;
# if EXTRUDERS > 2
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD MSG_DIAM_E3 , & filament_change_load_length [ 2 ] , 0.0 , extrude_maxlength ) ;
# if EXTRUDERS > 3
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD MSG_DIAM_E4 , & filament_change_load_length [ 3 ] , 0.0 , extrude_maxlength ) ;
# if EXTRUDERS > 4
MENU_MULTIPLIER_ITEM_EDIT ( float3 , MSG_FILAMENT_LOAD MSG_DIAM_E5 , & filament_change_load_length [ 4 ] , 0.0 , extrude_maxlength ) ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# endif // EXTRUDERS > 1
# endif
END_MENU ( ) ;
END_MENU ( ) ;
}
}
# endif // !NO_VOLUMETRICS
# endif // !NO_VOLUMETRICS || ADVANCED_PAUSE_FEATURE
/**
/**
*
*
@ -4131,12 +4103,258 @@ void kill_screen(const char* lcd_msg) {
*/
*/
# if ENABLED(ADVANCED_PAUSE_FEATURE)
# if ENABLED(ADVANCED_PAUSE_FEATURE)
/**
*
* " Change Filament " > " Change/Unload/Load Filament " submenu
*
*/
static AdvancedPauseMode _change_filament_temp_mode ;
static int8_t _change_filament_temp_extruder ;
static const char * _change_filament_temp_command ( ) {
switch ( _change_filament_temp_mode ) {
case ADVANCED_PAUSE_MODE_LOAD_FILAMENT :
return PSTR ( " M701 T%d " ) ;
case ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT :
return _change_filament_temp_extruder > = 0 ? PSTR ( " M702 T%d " ) : PSTR ( " M702 ;%d " ) ;
case ADVANCED_PAUSE_MODE_PAUSE_PRINT :
default :
return PSTR ( " M600 B0 T%d " ) ;
}
return PSTR ( MSG_FILAMENTCHANGE ) ;
}
void _change_filament_temp ( const uint8_t index ) {
char cmd [ 11 ] ;
sprintf_P ( cmd , _change_filament_temp_command ( ) , _change_filament_temp_extruder ) ;
thermalManager . setTargetHotend ( index = = 1 ? PREHEAT_1_TEMP_HOTEND : PREHEAT_2_TEMP_HOTEND , _change_filament_temp_extruder ) ;
lcd_enqueue_command ( cmd ) ;
}
void _lcd_change_filament_temp_1_menu ( ) { _change_filament_temp ( 1 ) ; }
void _lcd_change_filament_temp_2_menu ( ) { _change_filament_temp ( 2 ) ; }
static const char * change_filament_header ( const AdvancedPauseMode mode ) {
switch ( mode ) {
case ADVANCED_PAUSE_MODE_LOAD_FILAMENT :
return PSTR ( MSG_FILAMENTLOAD ) ;
case ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT :
return PSTR ( MSG_FILAMENTUNLOAD ) ;
default : break ;
}
return PSTR ( MSG_FILAMENTCHANGE ) ;
}
void _lcd_temp_menu_filament_op ( const AdvancedPauseMode mode , const int8_t extruder ) {
_change_filament_temp_mode = mode ;
_change_filament_temp_extruder = extruder ;
START_MENU ( ) ;
if ( LCD_HEIGHT > = 4 ) STATIC_ITEM_P ( change_filament_header ( mode ) , true , true ) ;
MENU_BACK ( MSG_FILAMENTCHANGE ) ;
MENU_ITEM ( submenu , MSG_PREHEAT_1 , _lcd_change_filament_temp_1_menu ) ;
MENU_ITEM ( submenu , MSG_PREHEAT_2 , _lcd_change_filament_temp_2_menu ) ;
END_MENU ( ) ;
}
void lcd_temp_menu_e0_filament_change ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_PAUSE_PRINT , 0 ) ; }
void lcd_temp_menu_e0_filament_load ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_LOAD_FILAMENT , 0 ) ; }
void lcd_temp_menu_e0_filament_unload ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , 0 ) ; }
# if E_STEPPERS > 1
void lcd_temp_menu_e1_filament_change ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_PAUSE_PRINT , 1 ) ; }
void lcd_temp_menu_e1_filament_load ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_LOAD_FILAMENT , 1 ) ; }
void lcd_temp_menu_e1_filament_unload ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , 1 ) ; }
# if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
void lcd_unload_filament_all_temp_menu ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , - 1 ) ; }
# endif
# if E_STEPPERS > 2
void lcd_temp_menu_e2_filament_change ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_PAUSE_PRINT , 2 ) ; }
void lcd_temp_menu_e2_filament_load ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_LOAD_FILAMENT , 2 ) ; }
void lcd_temp_menu_e2_filament_unload ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , 2 ) ; }
# if E_STEPPERS > 3
void lcd_temp_menu_e3_filament_change ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_PAUSE_PRINT , 3 ) ; }
void lcd_temp_menu_e3_filament_load ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_LOAD_FILAMENT , 3 ) ; }
void lcd_temp_menu_e3_filament_unload ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , 3 ) ; }
# if E_STEPPERS > 4
void lcd_temp_menu_e4_filament_change ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_PAUSE_PRINT , 4 ) ; }
void lcd_temp_menu_e4_filament_load ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_LOAD_FILAMENT , 4 ) ; }
void lcd_temp_menu_e4_filament_unload ( ) { _lcd_temp_menu_filament_op ( ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT , 4 ) ; }
# endif // E_STEPPERS > 4
# endif // E_STEPPERS > 3
# endif // E_STEPPERS > 2
# endif // E_STEPPERS > 1
/**
*
* " Change Filament " submenu
*
*/
# if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
void lcd_change_filament_menu ( ) {
START_MENU ( ) ;
MENU_BACK ( MSG_PREPARE ) ;
// Change filament
# if E_STEPPERS == 1
PGM_P msg0 = PSTR ( MSG_FILAMENTCHANGE ) ;
if ( thermalManager . targetTooColdToExtrude ( active_extruder ) )
MENU_ITEM_P ( submenu , msg0 , lcd_temp_menu_e0_filament_change ) ;
else
MENU_ITEM_P ( gcode , msg0 , PSTR ( " M600 B0 " ) ) ;
# else
PGM_P msg0 = PSTR ( MSG_FILAMENTCHANGE " " MSG_E1 ) ;
PGM_P msg1 = PSTR ( MSG_FILAMENTCHANGE " " MSG_E2 ) ;
if ( thermalManager . targetTooColdToExtrude ( 0 ) )
MENU_ITEM_P ( submenu , msg0 , lcd_temp_menu_e0_filament_change ) ;
else
MENU_ITEM_P ( gcode , msg0 , PSTR ( " M600 B0 T0 " ) ) ;
if ( thermalManager . targetTooColdToExtrude ( 1 ) )
MENU_ITEM_P ( submenu , msg1 , lcd_temp_menu_e1_filament_change ) ;
else
MENU_ITEM_P ( gcode , msg1 , PSTR ( " M600 B0 T1 " ) ) ;
# if E_STEPPERS > 2
PGM_P msg2 = PSTR ( MSG_FILAMENTCHANGE " " MSG_E3 ) ;
if ( thermalManager . targetTooColdToExtrude ( 2 ) )
MENU_ITEM_P ( submenu , msg2 , lcd_temp_menu_e2_filament_change ) ;
else
MENU_ITEM_P ( gcode , msg2 , PSTR ( " M600 B0 T2 " ) ) ;
# if E_STEPPERS > 3
PGM_P msg3 = PSTR ( MSG_FILAMENTCHANGE " " MSG_E4 ) ;
if ( thermalManager . targetTooColdToExtrude ( 3 ) )
MENU_ITEM_P ( submenu , msg3 , lcd_temp_menu_e3_filament_change ) ;
else
MENU_ITEM_P ( gcode , msg3 , PSTR ( " M600 B0 T3 " ) ) ;
# if E_STEPPERS > 4
PGM_P msg4 = PSTR ( MSG_FILAMENTCHANGE " " MSG_E5 ) ;
if ( thermalManager . targetTooColdToExtrude ( 4 ) )
MENU_ITEM_P ( submenu , msg4 , lcd_temp_menu_e4_filament_change ) ;
else
MENU_ITEM_P ( gcode , msg4 , PSTR ( " M600 B0 T4 " ) ) ;
# endif // E_STEPPERS > 4
# endif // E_STEPPERS > 3
# endif // E_STEPPERS > 2
# endif // E_STEPPERS == 1
# if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
if ( ! planner . movesplanned ( ) & & ! IS_SD_FILE_OPEN ) {
// Load filament
# if E_STEPPERS == 1
PGM_P msg0 = PSTR ( MSG_FILAMENTLOAD ) ;
if ( thermalManager . targetTooColdToExtrude ( active_extruder ) )
MENU_ITEM_P ( submenu , msg0 , lcd_temp_menu_e0_filament_load ) ;
else
MENU_ITEM_P ( gcode , msg0 , PSTR ( " M701 " ) ) ;
# else
PGM_P msg0 = PSTR ( MSG_FILAMENTLOAD " " MSG_E1 ) ;
PGM_P msg1 = PSTR ( MSG_FILAMENTLOAD " " MSG_E2 ) ;
if ( thermalManager . targetTooColdToExtrude ( 0 ) )
MENU_ITEM_P ( submenu , msg0 , lcd_temp_menu_e0_filament_load ) ;
else
MENU_ITEM_P ( gcode , msg0 , PSTR ( " M701 T0 " ) ) ;
if ( thermalManager . targetTooColdToExtrude ( 1 ) )
MENU_ITEM_P ( submenu , msg1 , lcd_temp_menu_e1_filament_load ) ;
else
MENU_ITEM_P ( gcode , msg1 , PSTR ( " M701 T1 " ) ) ;
# if E_STEPPERS > 2
PGM_P msg2 = PSTR ( MSG_FILAMENTLOAD " " MSG_E3 ) ;
if ( thermalManager . targetTooColdToExtrude ( 2 ) )
MENU_ITEM_P ( submenu , msg2 , lcd_temp_menu_e2_filament_load ) ;
else
MENU_ITEM_P ( gcode , msg2 , PSTR ( " M701 T2 " ) ) ;
# if E_STEPPERS > 3
PGM_P msg3 = PSTR ( MSG_FILAMENTLOAD " " MSG_E4 ) ;
if ( thermalManager . targetTooColdToExtrude ( 3 ) )
MENU_ITEM_P ( submenu , msg3 , lcd_temp_menu_e3_filament_load ) ;
else
MENU_ITEM_P ( gcode , msg3 , PSTR ( " M701 T3 " ) ) ;
# if E_STEPPERS > 4
PGM_P msg4 = PSTR ( MSG_FILAMENTLOAD " " MSG_E5 ) ;
if ( thermalManager . targetTooColdToExtrude ( 4 ) )
MENU_ITEM_P ( submenu , msg4 , lcd_temp_menu_e4_filament_load ) ;
else
MENU_ITEM_P ( gcode , msg4 , PSTR ( " M701 T4 " ) ) ;
# endif // E_STEPPERS > 4
# endif // E_STEPPERS > 3
# endif // E_STEPPERS > 2
# endif // E_STEPPERS == 1
// Unload filament
# if E_STEPPERS == 1
if ( ! thermalManager . targetTooColdToExtrude ( active_extruder ) )
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD , PSTR ( " M702 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD , lcd_temp_menu_e0_filament_unload ) ;
# else
# if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
if ( ! thermalManager . targetTooColdToExtrude ( 0 )
# if E_STEPPERS > 1
& & ! thermalManager . targetTooColdToExtrude ( 1 )
# if E_STEPPERS > 2
& & ! thermalManager . targetTooColdToExtrude ( 2 )
# if E_STEPPERS > 3
& & ! thermalManager . targetTooColdToExtrude ( 3 )
# if E_STEPPERS > 4
& & ! thermalManager . targetTooColdToExtrude ( 4 )
# endif // E_STEPPERS > 4
# endif // E_STEPPERS > 3
# endif // E_STEPPERS > 2
# endif // E_STEPPERS > 1
)
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD_ALL , PSTR ( " M702 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD_ALL , lcd_unload_filament_all_temp_menu ) ;
# endif
if ( ! thermalManager . targetTooColdToExtrude ( 0 ) )
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E1 , PSTR ( " M702 T0 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E1 , lcd_temp_menu_e0_filament_unload ) ;
if ( ! thermalManager . targetTooColdToExtrude ( 1 ) )
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E2 , PSTR ( " M702 T1 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E2 , lcd_temp_menu_e1_filament_unload ) ;
# if E_STEPPERS > 2
if ( ! thermalManager . targetTooColdToExtrude ( 2 ) )
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E3 , PSTR ( " M702 T2 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E3 , lcd_temp_menu_e2_filament_unload ) ;
# if E_STEPPERS > 3
if ( ! thermalManager . targetTooColdToExtrude ( 3 ) )
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E4 , PSTR ( " M702 T3 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E4 , lcd_temp_menu_e3_filament_unload ) ;
# if E_STEPPERS > 4
if ( ! thermalManager . targetTooColdToExtrude ( 4 ) )
MENU_ITEM ( gcode , MSG_FILAMENTUNLOAD " " MSG_E5 , PSTR ( " M702 T4 " ) ) ;
else
MENU_ITEM ( submenu , MSG_FILAMENTUNLOAD " " MSG_E5 , lcd_temp_menu_e4_filament_unload ) ;
# endif // E_STEPPERS > 4
# endif // E_STEPPERS > 3
# endif // E_STEPPERS > 2
# endif // E_STEPPERS == 1
}
# endif
END_MENU ( ) ;
}
# endif
static AdvancedPauseMode advanced_pause_mode = ADVANCED_PAUSE_MODE_PAUSE_PRINT ;
static uint8_t hotend_status_extruder = 0 ;
static const char * advanced_pause_header ( ) {
switch ( advanced_pause_mode ) {
case ADVANCED_PAUSE_MODE_LOAD_FILAMENT :
return PSTR ( MSG_FILAMENT_CHANGE_HEADER_LOAD ) ;
case ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT :
return PSTR ( MSG_FILAMENT_CHANGE_HEADER_UNLOAD ) ;
default : break ;
}
return PSTR ( MSG_FILAMENT_CHANGE_HEADER_PAUSE ) ;
}
// Portions from STATIC_ITEM...
// Portions from STATIC_ITEM...
# define HOTEND_STATUS_ITEM() do { \
# define HOTEND_STATUS_ITEM() do { \
if ( _menuLineNr = = _thisItemNr ) { \
if ( _menuLineNr = = _thisItemNr ) { \
if ( lcdDrawUpdate ) { \
if ( lcdDrawUpdate ) { \
lcd_implementation_drawmenu_static ( _lcdLineNr , PSTR ( MSG_FILAMENT_CHANGE_NOZZLE ) , false , true ) ; \
lcd_implementation_drawmenu_static ( _lcdLineNr , PSTR ( MSG_FILAMENT_CHANGE_NOZZLE ) , false , true ) ; \
lcd_implementation_hotend_status ( _lcdLineNr ) ; \
lcd_implementation_hotend_status ( _lcdLineNr , hotend_status_extruder ) ; \
} \
} \
if ( _skipStatic & & encoderLine < = _thisItemNr ) { \
if ( _skipStatic & & encoderLine < = _thisItemNr ) { \
encoderPosition + = ENCODER_STEPS_PER_MENU_ITEM ; \
encoderPosition + = ENCODER_STEPS_PER_MENU_ITEM ; \
@ -4147,18 +4365,6 @@ void kill_screen(const char* lcd_msg) {
+ + _thisItemNr ; \
+ + _thisItemNr ; \
} while ( 0 )
} while ( 0 )
void lcd_advanced_pause_toocold_menu ( ) {
START_MENU ( ) ;
STATIC_ITEM ( MSG_HEATING_FAILED_LCD , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_MINTEMP STRINGIFY ( EXTRUDE_MINTEMP ) " . " , false , false ) ;
MENU_BACK ( MSG_BACK ) ;
# if LCD_HEIGHT > 4
STATIC_ITEM ( " " ) ;
# endif
HOTEND_STATUS_ITEM ( ) ;
END_MENU ( ) ;
}
void lcd_advanced_pause_resume_print ( ) {
void lcd_advanced_pause_resume_print ( ) {
advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_RESUME_PRINT ;
advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_RESUME_PRINT ;
}
}
@ -4173,13 +4379,13 @@ void kill_screen(const char* lcd_msg) {
STATIC_ITEM ( MSG_FILAMENT_CHANGE_OPTION_HEADER , true , false ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_OPTION_HEADER , true , false ) ;
# endif
# endif
MENU_ITEM ( function , MSG_FILAMENT_CHANGE_OPTION_RESUME , lcd_advanced_pause_resume_print ) ;
MENU_ITEM ( function , MSG_FILAMENT_CHANGE_OPTION_RESUME , lcd_advanced_pause_resume_print ) ;
MENU_ITEM ( function , MSG_FILAMENT_CHANGE_OPTION_EXTRUD E , lcd_advanced_pause_extrude_more ) ;
MENU_ITEM ( function , MSG_FILAMENT_CHANGE_OPTION_PURG E , lcd_advanced_pause_extrude_more ) ;
END_MENU ( ) ;
END_MENU ( ) ;
}
}
void lcd_advanced_pause_init_message ( ) {
void lcd_advanced_pause_init_message ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INIT_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INIT_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_INIT_2
# ifdef MSG_FILAMENT_CHANGE_INIT_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INIT_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INIT_2 ) ;
@ -4202,7 +4408,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_advanced_pause_unload_message ( ) {
void lcd_advanced_pause_unload_message ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_UNLOAD_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_UNLOAD_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_UNLOAD_2
# ifdef MSG_FILAMENT_CHANGE_UNLOAD_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_UNLOAD_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_UNLOAD_2 ) ;
@ -4225,7 +4431,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_advanced_pause_wait_for_nozzles_to_heat ( ) {
void lcd_advanced_pause_wait_for_nozzles_to_heat ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEATING_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEATING_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_HEATING_2
# ifdef MSG_FILAMENT_CHANGE_HEATING_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEATING_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEATING_2 ) ;
@ -4242,7 +4448,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_advanced_pause_heat_nozzle ( ) {
void lcd_advanced_pause_heat_nozzle ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEAT_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEAT_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_INSERT_2
# ifdef MSG_FILAMENT_CHANGE_INSERT_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEAT_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEAT_2 ) ;
@ -4259,7 +4465,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_advanced_pause_insert_message ( ) {
void lcd_advanced_pause_insert_message ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INSERT_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INSERT_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_INSERT_2
# ifdef MSG_FILAMENT_CHANGE_INSERT_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INSERT_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_INSERT_2 ) ;
@ -4282,7 +4488,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_advanced_pause_load_message ( ) {
void lcd_advanced_pause_load_message ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_LOAD_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_LOAD_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_LOAD_2
# ifdef MSG_FILAMENT_CHANGE_LOAD_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_LOAD_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_LOAD_2 ) ;
@ -4303,18 +4509,18 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN ( ) ;
END_SCREEN ( ) ;
}
}
void lcd_advanced_pause_extrud e_message ( ) {
void lcd_advanced_pause_purg e_message ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_EXTRUD E_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_PURG E_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_EXTRUD E_2
# ifdef MSG_FILAMENT_CHANGE_PURG E_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_EXTRUD E_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_PURG E_2 ) ;
# define __FC_LINES_G 3
# define __FC_LINES_G 3
# else
# else
# define __FC_LINES_G 2
# define __FC_LINES_G 2
# endif
# endif
# ifdef MSG_FILAMENT_CHANGE_EXTRUD E_3
# ifdef MSG_FILAMENT_CHANGE_PURG E_3
STATIC_ITEM ( MSG_FILAMENT_CHANGE_EXTRUD E_3 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_PURG E_3 ) ;
# define _FC_LINES_G (__FC_LINES_G + 1)
# define _FC_LINES_G (__FC_LINES_G + 1)
# else
# else
# define _FC_LINES_G __FC_LINES_G
# define _FC_LINES_G __FC_LINES_G
@ -4328,7 +4534,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_advanced_pause_resume_message ( ) {
void lcd_advanced_pause_resume_message ( ) {
START_SCREEN ( ) ;
START_SCREEN ( ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_HEADER , true , true ) ;
STATIC_ITEM_P ( advanced_pause_header ( ) , true , true ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_RESUME_1 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_RESUME_1 ) ;
# ifdef MSG_FILAMENT_CHANGE_RESUME_2
# ifdef MSG_FILAMENT_CHANGE_RESUME_2
STATIC_ITEM ( MSG_FILAMENT_CHANGE_RESUME_2 ) ;
STATIC_ITEM ( MSG_FILAMENT_CHANGE_RESUME_2 ) ;
@ -4339,49 +4545,38 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN ( ) ;
END_SCREEN ( ) ;
}
}
void lcd_advanced_pause_show_message ( const AdvancedPauseMessage message ) {
FORCE_INLINE screenFunc_t ap_message_screen ( const AdvancedPauseMessage message ) {
switch ( message ) {
switch ( message ) {
case ADVANCED_PAUSE_MESSAGE_INIT :
case ADVANCED_PAUSE_MESSAGE_INIT : return lcd_advanced_pause_init_message ;
defer_return_to_status = true ;
case ADVANCED_PAUSE_MESSAGE_UNLOAD : return lcd_advanced_pause_unload_message ;
lcd_goto_screen ( lcd_advanced_pause_init_message ) ;
case ADVANCED_PAUSE_MESSAGE_INSERT : return lcd_advanced_pause_insert_message ;
break ;
case ADVANCED_PAUSE_MESSAGE_LOAD : return lcd_advanced_pause_load_message ;
case ADVANCED_PAUSE_MESSAGE_UNLOAD :
case ADVANCED_PAUSE_MESSAGE_PURGE : return lcd_advanced_pause_purge_message ;
defer_return_to_status = true ;
case ADVANCED_PAUSE_MESSAGE_RESUME : return lcd_advanced_pause_resume_message ;
lcd_goto_screen ( lcd_advanced_pause_unload_message ) ;
case ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE : return lcd_advanced_pause_heat_nozzle ;
break ;
case ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT : return lcd_advanced_pause_wait_for_nozzles_to_heat ;
case ADVANCED_PAUSE_MESSAGE_INSERT :
case ADVANCED_PAUSE_MESSAGE_OPTION : advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR ;
defer_return_to_status = true ;
return lcd_advanced_pause_option_menu ;
lcd_goto_screen ( lcd_advanced_pause_insert_message ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_LOAD :
defer_return_to_status = true ;
lcd_goto_screen ( lcd_advanced_pause_load_message ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_EXTRUDE :
defer_return_to_status = true ;
lcd_goto_screen ( lcd_advanced_pause_extrude_message ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE :
defer_return_to_status = true ;
lcd_goto_screen ( lcd_advanced_pause_heat_nozzle ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT :
defer_return_to_status = true ;
lcd_goto_screen ( lcd_advanced_pause_wait_for_nozzles_to_heat ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_OPTION :
defer_return_to_status = true ;
advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR ;
lcd_goto_screen ( lcd_advanced_pause_option_menu ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_RESUME :
defer_return_to_status = true ;
lcd_goto_screen ( lcd_advanced_pause_resume_message ) ;
break ;
case ADVANCED_PAUSE_MESSAGE_STATUS :
case ADVANCED_PAUSE_MESSAGE_STATUS :
lcd_return_to_status ( ) ;
default : break ;
break ;
}
}
return NULL ;
}
void lcd_advanced_pause_show_message (
const AdvancedPauseMessage message ,
const AdvancedPauseMode mode /*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/ ,
const uint8_t extruder /*=active_extruder*/
) {
advanced_pause_mode = mode ;
hotend_status_extruder = extruder ;
const screenFunc_t next_screen = ap_message_screen ( message ) ;
if ( next_screen ) {
defer_return_to_status = true ;
lcd_goto_screen ( next_screen ) ;
}
else
lcd_return_to_status ( ) ;
}
}
# endif // ADVANCED_PAUSE_FEATURE
# endif // ADVANCED_PAUSE_FEATURE
@ -4742,7 +4937,7 @@ void lcd_update() {
if ( UBL_CONDITION & & LCD_CLICKED ) {
if ( UBL_CONDITION & & LCD_CLICKED ) {
if ( ! wait_for_unclick ) { // If not waiting for a debounce release:
if ( ! wait_for_unclick ) { // If not waiting for a debounce release:
wait_for_unclick = true ; // Set debounce flag to ignore continous clicks
wait_for_unclick = true ; // Set debounce flag to ignore continous clicks
lcd_clicked = ! wait_for_user & & ! no_reentry ; // Flag the click if allowed
lcd_clicked = ! wait_for_user & & ! no_reentry ; // Keep the click if not waiting for a user-click
wait_for_user = false ; // Any click clears wait for user
wait_for_user = false ; // Any click clears wait for user
lcd_quick_feedback ( ) ; // Always make a click sound
lcd_quick_feedback ( ) ; // Always make a click sound
}
}