Merge pull request #4763 from sarusani/RemoveLoadMenuOnAutoload

Remove lcd_menu_AutoLoadFilament
This commit is contained in:
3d-gussner 2025-03-10 08:17:12 +01:00 committed by GitHub
commit 26ed278d02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 50 additions and 7 deletions

View File

@ -253,7 +253,9 @@ extern const char MSG_LOADING_COLOR [] PROGMEM_I1 = ISTR("Loading color"); ////M
extern const char MSG_CORRECTLY [] PROGMEM_I1 = ISTR("Changed correctly"); ////MSG_CORRECTLY c=19 extern const char MSG_CORRECTLY [] PROGMEM_I1 = ISTR("Changed correctly"); ////MSG_CORRECTLY c=19
extern const char MSG_NOT_LOADED [] PROGMEM_I1 = ISTR("Filament not loaded"); ////MSG_NOT_LOADED c=19 extern const char MSG_NOT_LOADED [] PROGMEM_I1 = ISTR("Filament not loaded"); ////MSG_NOT_LOADED c=19
extern const char MSG_NOT_COLOR [] PROGMEM_I1 = ISTR("Color not correct"); ////MSG_NOT_COLOR c=19 extern const char MSG_NOT_COLOR [] PROGMEM_I1 = ISTR("Color not correct"); ////MSG_NOT_COLOR c=19
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
extern const char MSG_AUTOLOADING_ENABLED [] PROGMEM_I1 = ISTR("Autoloading filament is active, just press the knob and insert filament..."); ////MSG_AUTOLOADING_ENABLED c=20 r=4 extern const char MSG_AUTOLOADING_ENABLED [] PROGMEM_I1 = ISTR("Autoloading filament is active, just press the knob and insert filament..."); ////MSG_AUTOLOADING_ENABLED c=20 r=4
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
extern const char MSG_FILAMENT_USED [] PROGMEM_I1 = ISTR("Filament used"); ////MSG_FILAMENT_USED c=19 extern const char MSG_FILAMENT_USED [] PROGMEM_I1 = ISTR("Filament used"); ////MSG_FILAMENT_USED c=19
extern const char MSG_PRINT_TIME [] PROGMEM_I1 = ISTR("Print time"); ////MSG_PRINT_TIME c=19 extern const char MSG_PRINT_TIME [] PROGMEM_I1 = ISTR("Print time"); ////MSG_PRINT_TIME c=19
extern const char MSG_TOTAL_FILAMENT [] PROGMEM_I1 = ISTR("Total filament"); ////MSG_TOTAL_FILAMENT c=19 extern const char MSG_TOTAL_FILAMENT [] PROGMEM_I1 = ISTR("Total filament"); ////MSG_TOTAL_FILAMENT c=19

View File

@ -252,7 +252,9 @@ extern const char MSG_LOADING_COLOR [];
extern const char MSG_CORRECTLY []; extern const char MSG_CORRECTLY [];
extern const char MSG_NOT_LOADED []; extern const char MSG_NOT_LOADED [];
extern const char MSG_NOT_COLOR []; extern const char MSG_NOT_COLOR [];
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
extern const char MSG_AUTOLOADING_ENABLED []; extern const char MSG_AUTOLOADING_ENABLED [];
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
extern const char MSG_FILAMENT_USED []; extern const char MSG_FILAMENT_USED [];
extern const char MSG_PRINT_TIME []; extern const char MSG_PRINT_TIME [];
extern const char MSG_TOTAL_FILAMENT []; extern const char MSG_TOTAL_FILAMENT [];

View File

@ -2296,13 +2296,13 @@ void lcd_load_filament_color_check()
} }
} }
#ifdef FILAMENT_SENSOR #if defined(FILAMENT_SENSOR) && !defined(REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY)
static void lcd_menu_AutoLoadFilament() static void lcd_menu_AutoLoadFilament()
{ {
lcd_display_message_fullscreen_nonBlocking_P(_T(MSG_AUTOLOADING_ENABLED)); lcd_display_message_fullscreen_nonBlocking_P(_T(MSG_AUTOLOADING_ENABLED));
menu_back_if_clicked(); menu_back_if_clicked();
} }
#endif //FILAMENT_SENSOR #endif //FILAMENT_SENSOR && REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
static void preheat_or_continue(FilamentAction action) { static void preheat_or_continue(FilamentAction action) {
@ -5351,13 +5351,16 @@ static void lcd_main_menu()
if (!fsensor.getAutoLoadEnabled()) { if (!fsensor.getAutoLoadEnabled()) {
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament); MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
} }
if (!fsensor.getFilamentPresent()) { if (fsensor.getFilamentPresent()) {
if (fsensor.getAutoLoadEnabled()) {
MENU_ITEM_SUBMENU_P(_T(MSG_AUTOLOAD_FILAMENT), lcd_menu_AutoLoadFilament);
}
} else {
MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament); MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament);
} }
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
else {
if (fsensor.getAutoLoadEnabled()) {
MENU_ITEM_SUBMENU_P(_T(MSG_AUTOLOAD_FILAMENT), lcd_menu_AutoLoadFilament);
}
}
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
} else { } else {
#endif //FILAMENT_SENSOR #endif //FILAMENT_SENSOR
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament); MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);

View File

@ -527,4 +527,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -531,4 +531,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -535,4 +535,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -536,4 +536,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -694,4 +694,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -695,4 +695,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -697,4 +697,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -706,4 +706,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -707,4 +707,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -709,4 +709,7 @@
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -437,4 +437,7 @@ THERMISTORS SETTINGS
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H

View File

@ -436,4 +436,7 @@ THERMISTORS SETTINGS
//Show filename instead of print time after SD card print finished //Show filename instead of print time after SD card print finished
//#define SHOW_FILENAME_AFTER_FINISH //#define SHOW_FILENAME_AFTER_FINISH
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
#endif //__CONFIGURATION_PRUSA_H #endif //__CONFIGURATION_PRUSA_H